出现tkinter的TclError: can not invoke button command application has been destroyed

首先考虑你的控件是否在窗体mainloop前面打包完毕

如果确定没有上述问题了,使用button调用方法的时候(例如我用到另一个文件的方法),需要用lamba

Button(master,text="转到测试",command=lambda :test.range)

你可能感兴趣的:(出现tkinter的TclError: can not invoke button command application has been destroyed)