[wxPython-users] Passing Arguments to Class
Werner F. Bruhin
werner.bruhin at free.fr
Thu Nov 16 09:37:06 PST 2006
Hi Rich,
Rich Shepard wrote:
> I have an instance of a wx.Dialog() used to enter new variable
> names. I'd
> like to use the same instance to edit those names, too. This requires
> passing the variables in the caller and setting them in the wx.TextCtrl()
> widgets in the dialog box. If the class is called by the "Add" button,
> blank strings are passed as parameters; if called by the "Edit" button,
> existing values are passed.
>
...
What about instead using a method?
def InitDialog(self, dictofvalues):
do whatever with the dict
before you do dialog.show, call dialog.InitDialog(withdictofstufftopath)
Werner
More information about the wxpython-users
mailing list