Don't understand wxPython ids

Greg Krohn greg at invalid.invalid
Wed Apr 28 18:29:38 EDT 2004


Greg Krohn wrote:
> If I can't figure this out, I'll try subclassing individule widgets and 
> throwing it in a module.
> 
> greg

Here we go. Use the attached module like this:

#yourmodule.py
import wx
from event_kwargs import *

... your code ...

self.ok_button = wx.Button(self, -1, "Ok", EVT_BUTTON=self.OnOk)

...more code...


The only testing I've done is in the "if __name__ == '__main__'" part of 
the module. I *haven't* tested all the widgets and events, but they 
should theoretically work.

greg
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: event_kwargs.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20040428/6afe0b4b/attachment.ksh>


More information about the Python-list mailing list