> To do what you want, there's a lot of ways, the below might be > one way; the technique here is to derive a custom group to parent > the buttons, and have the group's handle() method take over > keyup/down events, controlling the appropriate button value() > based on the key pushed/released. It also manages invoking the > button's callback, and forcing the correct button to take focus.
[...] > You can make your own button class > and make a custom draw() method that draws differently based on > the button's value(). Just be sure all your drawing calls happen > inside the buttons draw() method, and no where else. [...] Hi Greg, thank you for your helpfulness! Checking button::value() for both event and drawing routines is a good idea. Today I've tested your code and it works very well but I've found a little glitch if you add another widget outside MyButtonGroup, let's say a basic Fl_Button, then you click on it: MyButtonGroup loses focus and this is correct. Now if you push one of the three keys, the first time is spent to regain focus on MyButtonGroup, skipping the "pushed" state (as you can see from fprintf messages). Is there a way to make the grouped buttons always reactive apart from their focus? _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

