On 12.10.2012 11:45, MacArthur, Ian (SELEX GALILEO, UK) wrote: > >> Am using float input which will allow the float values. If the >> user pressed 'j' character then I have to show '.' automatically with out >> showing the 'j'. How can I achieve this?? > > I think, if it were me, I'd just derive my own float-input class from the > stock fltk widget, then override the handle() method to check for a tweak the > 'j' character as required.
Yep, that's what I would do as well. Done that in other similar cases. The key is to check the input key, and then to all Fl_(Float_)Input::insert() with this value instead of the parent class's handle() - which, BTW, must be done in all other cases. see Fl_Input::insert(const char *t, int l=0) <http://www.fltk.org/doc-1.3/classFl__Input__.html#aba3dbb11751918751183623a3f9d9f02> -- Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

