代码运行时,如何点击按钮Button,刷新Label里面数据
收起
import tkinter as tk def change(): lab["text"]="你看我哪点像从前" root = tk.Tk() but = tk.Button(root,text="点我",command=change) but.pack() lab = tk.Label(root,text="我要变形了") lab.pack()
报告相同问题?