Oguz Akyuz wrote:
> Hi,
>
> I would like to send "ENTER" events to a particular widget in my application.
> Currently, that widget receives this event only if the user presses enter
> while the cursor is on the widget.
>
> Is there a way to send the "ENTER" event to a widget regardless of where the
> cursor is?
Is this a situation where you can just call the widget's handle()
method with yourwidget->handle(FL_ENTER)?
You might check the code of the underlying FLTK code for the unnamed
widget in question (eg. if it's Fl_Input based, look at Fl_Input*cxx)
to see how it handles the enter key, and try sending that FLTK event
code.
Some widgets might be more complex looking for key up/down events
and/or a sequence of events, in which case that might be a bit
trickier to pull off.
Typically an input widget just triggers one of your own callbacks
when an enter key is hit, so maybe just calling your own callback
is all that's needed.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk