How to generate an event?

Problem:
As documented, the method wxListBox.SetSelection does not issue an
wxEVT_COMMAND_LISTBOX_SELECT event. However, in a specific application
I would like to have this event issued.

Question:
Can I issue an event "by hand"? Is there any function like
IssueEvent(instance, event_type) ready to use?

Thanks for your help!

Sebrosa

Jose' Sebrosa wrote:

Problem:
As documented, the method wxListBox.SetSelection does not issue an
wxEVT_COMMAND_LISTBOX_SELECT event. However, in a specific application
I would like to have this event issued.

Question:
Can I issue an event "by hand"? Is there any function like
IssueEvent(instance, event_type) ready to use?

Create an instance of wxCommandEvent and then do this:

     instance.GetEventHandler().ProcessEvent(event)

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!