【发布时间】:2021-09-25 22:23:11
【问题描述】:
我有一个用 tkinter 创建的单选按钮,单选按钮的逗号是:
def FieldsetChanger ():
lbl1_1.configure(state="enable")
Entry1_1.configure(state="enable")
lbl2_1.configure(state="enable")
Entry2_1.configure(state="enable")
我可以用for循环重写这个函数吗?
【问题讨论】:
-
您可以创建一个包含这些元素的列表,然后在每个列表项上调用
.configure(state="enable")。 -
.configure(state="normal")是normal而不是enable@SaatvikRamani
标签: python tkinter radio-button