Paul R wrote:
> Hi all,
>
> I have an error message window that pops up when required. I would
> like the user to be able to simply hit enter to clear it from screen,
> the window has an ok button to do this. However when the window
> is shown i cannot seem to get the button ready for events, i have tried
> the take_focus() call but it does not seem to work, the focus does not
> switch to the button, or anywhere else, the window is just 'there'
Try using an Fl_Return_Button instead of a regular button.
Spacebar is normally the keynav way to trigger a button when it has
focus.
When you want the Enter key to do it, us an Fl_Return_Button.
See also: the 'ask' program in the test directory,
which shows how the enter key works in a dialog.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk