📌  相关文章
📜  如何从列表中获取检查按钮 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:24.777000             🧑  作者: Mango

代码示例1
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()