Check buttons, the easy way : Checkbutton : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » Checkbutton »

 

Check buttons, the easy way


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 TUTORIALS

 Navioo Tkinker
» Checkbutton