Hi, I'm having problems with a widget, which I've been able to isolate to the following example:
from Tkinter import * def display(): global x print x root = Tk() x = 0 check = Checkbutton(root, variable=x) check.pack() button = Button(text='Display variable', command=display) button.pack() root.mainloop() As far as I understand the reference, when I click the button, the variable 'x' should reflect the state of the check button, and viceversa, if I change the value of x, from 0 to 1, the widget reflects the change. Well, in practice, I get a constant zero, whether I click or not the checkbutton. I must be missing something, but I can;t figure out what it is. Any comments will be welcome. TIA, Gerardo _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss