根据先前的tkinter条目小部件中提供的值添加条目小部件

时间:2020-03-15 06:11:54

标签: python tkinter

我添加了带有标签的输入向导。如果上一个输入向导的值满足条件,如何添加另一个输入向导?

这是我的代码

def JoinHouses():
    Label(root, text="Input the feature to join").grid(row=1)
    e1 = Entry(root)
    e1.grid(row=1, column=1)
    Button(root, text="submit", command=house(e1.get())).grid(row=2)

def house(a):
    HouseEntry = []   
    if a == "house":
        for i in range(3,7):
            HouseEntry.append(Label(root, text="Input the remarks to join").grid(row=i))
            e2 = Entry(root)
            e2.grid(row=i, column=1)

0 个答案:

没有答案