Diddy wrote:
> I'm trying to make a fltk window that responds to key presses as well a 
> buttons in the window.
> My class inherits Fl_Double_Window and overrides:
> 
> int MyWindow::handle(int event){
>       switch(event){
>               case FL_KEYBOARD://keypresses
>                       return this->handle_key(event, Fl::event_key());

You should call original handle here too if you disregard particular
event, like:

if(this->handle_key(event, Fl::event_key()))
  return 1;
else
  return Fl_Double_Window::handle(event);

Otherwise you would need to doplicate similar core for handling other
key events what is already in original handle.

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

Reply via email to