How to send event?

Hello,

I want HtmlListBox to react on Enter the same as on double click.
Robin advised me that I should catch EVT_KEY_DOWN and send EVT_LISTBOX_DCLICK myself.

I don't know how to send event. What should I read?

Best regards,
Rafal

Rafal wrote:

Hello,

I want HtmlListBox to react on Enter the same as on double click.
Robin advised me that I should catch EVT_KEY_DOWN and send EVT_LISTBOX_DCLICK myself.

I don't know how to send event. What should I read?

Do something like this (assuming self is the HtmlListBox):

  evt = wx.CommandEvent(wx.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
      self.GetId())
  evt.SetEventObject(self)
  self.GetEventHandler().ProcessEvent(evt)

ยทยทยท

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