【发布时间】:2020-09-10 11:04:53
【问题描述】:
我创建了这个程序,但我想要按钮“按钮”(第一部分) 如果我们不选择 checkButton(第二部分),将被停用。所以我想只有在选中 CheckButton 时才激活按钮。
acceptButton = IntVar()
case = Checkbutton(fenetre, text="I accept the agreement", variable=acceptButton, cursor="hand2", bg="white",)
case.pack()
var = case.select() == 1
doNotButton = IntVar()
case2 = Checkbutton(fenetre, text="I do not accept the agreement", variable=doNotButton, bg="white", state=DISABLED) #il est impossible de cocher cette case
case2.pack()
按钮:
button = Button(fenetre, text="Suivant", command=commandSuiv, cursor="hand2", height=1, width = 15) #taille
button.pack()
button.place(x=c, y=d)
button.configure(font=f)
非常感谢 :)
【问题讨论】:
-
致敬安东宁!请按照我们关于how to ask? 的指南中的说明将您的问题更改为英语。通过这种方式,社区中的更多人可以联系到您的问题。谢谢!
标签: python tkinter activation