Save check box states : CheckBox : GUI Tk PYTHON examples


PYTHON examples » GUI Tk » CheckBox »

 

Save check box states


Save check box states



from Tkinter import *      
states = []
def onPress(i):                       
    states[i= not states[i]   

root = Tk()
for i in range(10):
    chk = Checkbutton(root, text=str(i), command=(lambda i=i: onPress(i)) )
    chk.pack(side=LEFT)
    states.append(0)
root.mainloop()
print states                          


           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo GUI Tk
» CheckBox