On 20.10.2011 18:12, David wrote: >> On 19.10.2011 23:12, David wrote: >>> I have a group box with radio buttons, also some normal buttons, I set the >>> shortcut on one of the normal buttons as FL_Enter. My problem is if I have >>> keyboard focus set to one of the raido buttons and press enter, it just >>> moves to the next raido button, until the last one, which then does the >>> Fl_Enter shortcut. How do I prevent those from eating the Fl_Enter? >> >> Try setting visible_focus(0) on all radio buttons. This >> should probably do what you want (but maybe not). Could you >> please test and report back? >> >> Albrecht > > Nope, now no keyboard focus works at all on the radio buttons.
Yes, that's what visible_focus(0) is intended to do. > I should be able to use the keyboard/spacebar to select. Well, then this doesn't work for you. > Then enter to auto click the default (normal) button. (1) There is no such concept of a default radio button in FLTK. (2) FLTK doesn't use the Enter key to select buttons. You can use the spacebar only. The only exception is Fl_Enter_Button (did you mean this with "default (normal) button" ? > I also find a problem where if any of the other normal buttons are selected > and you press enter, it goes to the default button, Again, what do you mean with "default button"? > that is one case where the enter should click that button itself (the one > with keyboard focus). Again, currently FLTK doesn't use the Enter key for button clicks. There may be things that can be improved (e.g. using Enter to select radio buttons and to "click" other buttons), but that will probably not be done in the FLTK 1.x series for compatibility reasons. FLTK 3.0 will be a major update (although targeted at consolidation of FLTK 1 and 2 and not at introducing new features), so this may be something we *could* change in FLTK 3 or later. Anyway - if you want to change a widget's features, you are free to subclass the widget and use the handle() method to make it do what you want. The core widgets are not intended to do *everything* that all users expect, but to provide an extendible framework with features for "standard" applications ready to go. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

