Get check box states : CheckBox : GUI Tk PYTHON examples


PYTHON examples » GUI Tk » CheckBox »

 

Get check box states


Get check box states


# check buttons, the easy way 

from Tkinter import *      
root = Tk()
states = []                 
for i in range(10):
    var = IntVar()
    chk = Checkbutton(root, text=str(i), variable=var)
    chk.pack(side=LEFT)
    states.append(var)
root.mainloop()                               
print map((lambda var: var.get()), states)    

           
       



Leave a Comment / Note


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


PYTHON examples

 Navioo GUI Tk
» CheckBox