-1
由於某些原因,我在python中沒有更新我的標籤,當我在輸入框中輸入詳細信息時,它應該更新它。感謝您的幫助Python標籤不更新?
import tkinter
gui = tkinter.Tk()
num1e = tkinter.IntVar()
num2e = tkinter.IntVar()
num3e = tkinter.IntVar()
num4e = tkinter.IntVar()
num5e = tkinter.IntVar()
num6e = tkinter.IntVar()
num7e = tkinter.IntVar()
numout = tkinter.IntVar()
def Find():
numout.set = num1e
gui.geometry("450x450+500+300")
num1 = tkinter.Entry(gui, bd = 5, width = 1, textvariable = num1e).pack()
num2 = tkinter.Entry(gui, bd = 5, width = 1, textvariable = num2e).pack()
num3 = tkinter.Entry(gui, bd = 5, width = 1, textvariable = num3e).pack()
num4 = tkinter.Entry(gui, bd = 5, width = 1, textvariable = num4e).pack()
num5 = tkinter.Entry(gui, bd = 5, width = 1, textvariable = num5e).pack()
num6 = tkinter.Entry(gui, bd = 5, width = 1, textvariable = num6e).pack()
num7 = tkinter.Entry(gui, bd = 5, width = 1, textvariable = num7e).pack()
label = tkinter.Label(gui, textvariable = numout).pack()
Sb = tkinter.Button(gui, text ="Find 8th", command = Find).pack()
gui.mainloop()