Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get checkbutton from a list

from Tkinter import *

root = Tk()    

users = ['Anne', 'Bea', 'Chris']

for x in range(len(users)):
    l = Checkbutton(root, text=users[x][0], variable=users[x])
    print "l = Checkbutton(root, text=" + str(users[x][0]) + ", variable=" + str(users[x])
    l.pack(anchor = 'w')

root.mainloop()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #checkbutton #list
ADD COMMENT
Topic
Name
8+7 =