I have several wx.TextCtrl (single- and multi-line) in my application. Each
one's style list includes wx.TE_PROCESS_ENTER so I can capture the entered
string. The two events I bind to the widget are wx.EVT_TEXT and
wx.EVT_TEXT_ENTER.
In those two methods, I use the same basic format:
varName = widgetName.GetValue()
Is this the correct way to do this? For efficiency's sake, can I call a
single event handler for both initial data entry and for when it's changed?
Thanks,
Rich
···
--
Richard B. Shepard, Ph.D. | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
I have several wx.TextCtrl (single- and multi-line) in my application. Each
one's style list includes wx.TE_PROCESS_ENTER so I can capture the entered
string. The two events I bind to the widget are wx.EVT_TEXT and
wx.EVT_TEXT_ENTER.
In those two methods, I use the same basic format:
varName = widgetName.GetValue()
Is this the correct way to do this? For efficiency's sake, can I call a
single event handler for both initial data entry and for when it's changed?
If you want to do the same thing in response to both kinds of events then it's no problem.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!