Handling wx.TextCtrl Events

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

Rich Shepard wrote:

  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!

Thanks for confirming, Robin.

Rich

···

On Tue, 17 Jan 2006, Robin Dunn wrote:

If you want to do the same thing in response to both kinds of events then
it's no problem.

--
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