|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Responding only to user events
Hi,
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. thanks surya |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
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.
grim ![]()
__________________
*** Experimental Python Markup CGI V2 *** |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Responding only to user events |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|