Is there a way I can make a function happen only if the text is updated in certain text control, and its focus is lost?
I could make a workaround using global string variable, but does wxWidgets support mixing command events with focus events somehow?
Doing something if kill focused and command text updated?
Re: Doing something if kill focused and command text updated
Hi,
Regards,
David
One way would be to catch the textctrl's wxEVT_KILL_FOCUS, then in the handler check wxTextCtrl::IsModified. If it is, do <whatever>, then use SetModified(false).Is there a way I can make a function happen only if the text is updated in certain text control, and its focus is lost?
or perhaps something safer, such as a member variable...I could make a workaround using global string variable
No.but does wxWidgets support mixing command events with focus events somehow?
Regards,
David
Re: Doing something if kill focused and command text updated
Thanks for the reply anyway. I figured I could use wxEVT_COMMAND_TEXT_ENTER. It's actually better than what I planned.