【发布时间】:2019-12-26 10:27:25
【问题描述】:
我有两个按钮开始和停止,当我点击开始按钮时,我想通过一段时间,但是当我想停止它时, Tkinter 窗口被阻止,我无法点击停止按钮,因为整个窗口都被阻止了。
下面是我的代码:
s = 1
def Start():
while(s==1):
#do something
def Stop():
global s
s = 0
btn_Start= Button(root, text = 'Start',width=9, height=2, command = Start).place(x=2,y=2)
btn_Stop = Button(root, text = 'Stop',width=9, height=2, command = Stop).place(x=2,y=42)
有谁知道我怎样才能停止这段时间?
编辑:-------- 还是一样的错误
【问题讨论】:
标签: python python-3.x python-2.7 tkinter