[Tutor] Problems passing a parameter in a GUI
Alan Gauld
alan.gauld at btinternet.com
Wed Jan 19 18:59:40 CET 2011
"David Holland" <davholla2002 at yahoo.co.uk> wrote
> This works :-
>
> def create_widgets(self):
> self.submit_bttn=Button(self, text="Submit",
> command=self.reveal)
>
>
> But when I changed it to use a number I get an error message.
>
>def create_widgets(self,x):
> x= self.submit_bttn=Button(self, text="Submit",
> command=self.reveal(x))
Spot the difference in the commasnd parameter?
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list