python - finding wxpython event documentation -
how can find out functions , attributes of various events released wxpython?
when bound function triggered event sent bound function e.g.:
self.bind(wx.evt_button, self.eventbuttonfunction, self.button) ... def eventbuttonfunction(self,event):
each widget (e.g. checkbox, togglebutton etc) has different set of attributes , functions. can't find information in docs , have been resorting using dir print them out so:
def eventbuttonfunction(self,event): s in dir(event): print s
which annoying. in docs somewhere missing? thanks
the wxpython docs aren't complete underlying c++ wxwidgets docs, in many cases, you'll have use c++ docs, translating symbols of form wxfoo
wx.foo
.
you're looking this list, list of event classes mapped macros apply, , each class hyperlinked class definition, although it's still not entirely complete.
from memory, evt_button
generates wxcommandevent
, although if you're not sure event type you're getting, printing repr
of event object should help.
for example...
def eventbuttonfunction(self, event): print repr(event)
...yields...
<wx._core.commandevent; proxy of <swig object of type 'wxcommandevent *' @ 0x21eaec> >
it's bit of pain @ first, after you've used wxpython while, you'll used it.