brosnan wrote:
> Can you handle the events of a single widget, like Fl_Browser?
Yes. The technique you've used below is the way, you just
forgot to include some stuff..
> This code doesn't seem to handle the event of "flbrw" which is the name of a
> Fl_Browser:
>
> class flbrw : public Fl_Browser {
> public:
> int handle(int e) {
> cout << "test" << endl;
> }
> };
You really must do this:
int handle(int e) {
cout << "test" << endl;
return(Fl_Browser::handle(e)); // REQUIRED
}
..if you don't, you'll eclipse all events from the Fl_Browser widget.
You don't have to write the code exactly as I've shown above,
but you do have to effectively do what it does (pass the event
down to the base class, and return a correct 0 or 1 value)
See the docs on events for more info.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk