Responding only to user events
I am using wxpython . I have a wxTextCtrl in the Gui .
I am using EVT_TEXT(id, func) to handle events on textctrl.
But this event will always be sent when the text controls contents changes - whether this is due to user input or comes from the program itself (for example, if SetValue() is called) .
I want this function to called when user inputs something not when SetValue is called.How do I do that.
If you want to respond to user actions, respond to mouse moves/clicks and keyboard presses.
If you want to respond to text changed, respond to text changed.
Responding to text changed but wanting only certain changes isn't a good plan, or particularly easy.
Thank you very very much for the response
Actually my problem is ,
I have a textCrtl in GUi which is initialized with a value of cetrain string variable. It also has a Apply button.
But i want it to be disable when GUI loads up since user has not changed anything on Textctrl . I want Apply button to be enabled when users changes value in TextCtrl .But apply button is enabled because textCtrl is initalized with value of a variable hence causing txt_event.
Why not just disable e.g. apply_button.Enable(False), the Apply button after the text box is initialized or only bind the txt_event after the initialization.