Advanced Events in wxPython
- Since most GUI-applications are meant to merely "react" to user's action, event-programming is a good strategy to write GUI-applications. In this article, we shall describe the way events are processed in wxPython 2.6, and present the complete hierarchy of events used in wxPython.
- Event Handling is a complex enough matter in wxPython to be treated as a separate subject. We shall, here, try to present it as exhaustively as possible. Someday?
Hierarchy of Events
In wxPython, Events' base classes are wxEvent. Try the following code to assure yourself of it:
>>> import wx >>> issubclass(wxCloseEvent,wxEvent) True
>>> issubclass(wxCloseEvent,wxEventPtr) False
Use Bind() to bind wxObjects to wxEvents. Generally, self.Bind(wx.SOME_EVENT, callbackFn, self.boundObject). I dunno, that's a pretty crap example but hey it's something... As I dig around in this more I'll post more, but I'm just a n00b. --TomPlunket
Event handling overview in the wxWindows Documentation http://www.wxwidgets.org/manuals/2.5.3/wx_eventhandlingoverview.html
In the wxPython XXX