>     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.
>

class flbrw : public Fl_Browser {
    public:
    int handle(int e) {
        switch (e)
        {
            case FL_KEYBOARD:
                cout << "test" << endl;
            default:
                return(Fl_Browser::handle(e));
        }
        }
};

I am quite confused that it didn't return "test" when I selected a item and hit 
shift or enter in the keyboard?do you have to define flbrw in the class 
somewhere?

Thanks.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to