> > > I have a losting focus problem. > >=20 > > On a window, I have some Inputs. In every Input, i do not=20 > > want to lost focus until the value is ok for me. > >=20 > > Tried to modify Input.cxx. If i call take_focus() in handle()=20 > > when get UNFOCUS, this makes infinite recursion to handle(). > >=20 > > Any suggestion ? > > I think we need a bit more detail; what happens to cause the input > widget to lose the focus in the first place?
User clicks another Input on window or presses the Tab key or .... The cause is not important > > It may be easier to stop <that other action> from taking the focus away > than it is to make the input keep it... > Or - Can you make a subclass of the input widget, and in it's handle > method keep track of whether you just sent a take_focus(), and use that > to break the recusion? I think, subclassing is not enough to stop loosing the FOCUS. (Subclasses can have only replace() method. Others are not virtual) I've copied the Inpux.cxx to MyInput.cxx and changed all "Input" stuff to "MyInput". So i have "MyInput" class to make changes in all methods. In handle() method, when i got UNFOCUS event , i should refuse to loose the FOCUS. How ?? Regards CC Vural _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

