On 11.04.2012 11:06, Rajesh Kumar wrote: > Hi all, > > A frame consists of input boxes. I didn't set the Input box color. So > it taking fltk's default color. But when user clicks on input box or > pressed tab key and came to input box , then the color of that particular > input box should change and remaining input boxes color should not change. > How can I achieve this???
You must derive your own class and change the color when it is appropriate in the handle() method. In this case it's probably when the widget gets an FL_FOCUS event (you must return 1 after calling Fl_Input::handle(e) as well), and when the widget loses focus, i.e. when it gets an FL_UNFOCUS event. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

