Nigel W. Moriarty wrote:
Folks
I'm using wxFileDialog to get a filename and put it
into a wxTextCtrl but I would like to generate a
EVT_TEXT_ENTER event.if (dlg.ShowModal() == wxID_OK):
file_name = dlg.GetPath()
text_ctrl.SetValue(file_name)
#FORCE ENTER EVENT HERE
dlg.Destroy()
Something like this:
evt = wx.CommandEvent(wx.wxEVT_COMMAND_TEXT_ENTER,
text_ctrl.GetId())
evt.SetEventObject(text_ctrl)
evt.SetString(file_name)
text_ctrl.GetEventHandler().ProcessEvent(evt)
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!