Tkinter- checkbutton

Tuvas tuvas21 at gmail.com
Fri Nov 4 18:05:53 CET 2005


I want to have a checkbutton that when it is pushed will do a function
depending on if it was pushed before or not. Ei:

b=checkbutton(command=check)
b.grid(row=0,column=0)

def check():
    if (b.value==0):
           do_stuff_here()
    elif(b.value==1)
           do_other_stuff_here()


However, I keep running into problems with reading the data. How do I
make this work? Thanks!




More information about the Python-list mailing list