[wxPython-users] file with all events from a widget
Robin Dunn
robin at alldunn.com
Tue Jun 5 09:59:25 PDT 2007
Paul Perez wrote:
> On 6/4/07, *Paul Sijben* <sijben at eemvalley.com
> <mailto:sijben at eemvalley.com>> wrote:
>
> OK thanks for the info. So I can generate a first stab from the docs and
> then be more complete after the SoC, that is fine. This is one of those
> projects that I can not afford to spend time on and at the same time can
> not afford to let lie....
>
>
>
> Here is a bit of help to get you started...
>
> import wx, wx.wizard, wx.calendar
>
> def reverse(dic):
> result = {}
> for key,val in dic.items():
> if val in result:
> raise Warning, "Duplicated (%s/%s/%s) found in reverse
> dictionary." % (val,key,result[val])
> result[val] = key
> return result
>
> EventMapX = {
> 'EVT_ACTIVATE' : wx.wxEVT_ACTIVATE,
BTW, starting in 2.8 you can use the binder object's typeId property to
get the value of the corresponding wxEventType. For example:
>>>
>>> import wx
>>> wx.EVT_ACTIVATE.typeId
10158
>>> wx.wxEVT_ACTIVATE
10158
>>>
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list