import Tkinter as tk
class MyWindow(object):
def __init__(self):
self.root = tk.Tk()
button=tk.Button(self.root, text='NEXT', command=self.OnNext)
button.pack()
def OnNext(self):
win = MyWindow()
self.root.destroy()
win = MyWindow()
win.root.mainloop()
Tkinter destroy
最新推荐文章于 2022-06-10 18:11:15 发布