[Tutor] Help with class in class
leam hall
leamhall at gmail.com
Sun Sep 9 22:56:26 CEST 2012
self.blue = Button(root, text="Blue",
command=self.change_text_color("blue"))
self.blue.pack(side=LEFT)
self.green = Button(root, text="Green",
command=self.change_text_color("green"))
self.green.pack(side=LEFT)
To follow up, I've added a second button. Of course, it doesn't work, the
text comes out as the color of the last button. It is running the commands
in the Button line without the buttons being clicked.
More research...
--
Mind on a Mission <http://leamhall.blogspot.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120909/8e3d69ce/attachment.html>
More information about the Tutor
mailing list