0
如何關閉整個程序,一旦用戶在消息框中點擊確定?tkinter,消息框關閉程序點擊「確定」
這裏是包含按鈕和命令腳本的一部分:
class Application(tk.Tk):
def create_options(self):
tk.Button(self,
text = "Begin search", command=self.pop_up1
).place(x=465, y=285)
def pop_up1(self):
"""shows submitted box"""
tkMessageBox.showinfo(title="Finished", message="Query Submitted")
謝謝!我使用了 self.destroy() 並且做了訣竅。 – TheHoff
歡迎你,祝你的項目:) – D3181
@TheHoff記得標記這個答案爲接受點擊關閉在左邊的複選標記。 –