Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 2nd, 2004, 01:32 AM
wx_uab wx_uab is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Bimingham,AL
Posts: 68 wx_uab User rank is Private First Class (20 - 50 Reputation Level)wx_uab User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 14 h 58 m 22 sec
Reputation Power: 5
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

Reply With Quote
  #2  
Old July 2nd, 2004, 11:32 AM
sfb sfb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 447 sfb User rank is Corporal (100 - 500 Reputation Level)sfb User rank is Corporal (100 - 500 Reputation Level)sfb User rank is Corporal (100 - 500 Reputation Level)sfb User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 1 h 43 m 45 sec
Reputation Power: 9
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.

Reply With Quote
  #3  
Old July 3rd, 2004, 12:24 AM
wx_uab wx_uab is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Bimingham,AL
Posts: 68 wx_uab User rank is Private First Class (20 - 50 Reputation Level)wx_uab User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 14 h 58 m 22 sec
Reputation Power: 5
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.

Reply With Quote
  #4  
Old July 3rd, 2004, 05:00 AM
Grim Archon's Avatar
Grim Archon Grim Archon is offline
Mini me.
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Location: Cambridge, UK
Posts: 783 Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)  Folding Points: 1488 Folding Title: Novice Folder
Time spent in forums: 3 Days 2 h 15 m 57 sec
Reputation Power: 7
Send a message via MSN to Grim Archon
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 ***

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Responding only to user events


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT