Answers for "tkinter bind to window close"

0

tkinter bind to window close

def on_closing():
    if messagebox.askokcancel("Quit", "Do you want to quit?"):
        root.destroy()

root.protocol("WM_DELETE_WINDOW", on_closing)
root.mainloop()
Posted by: Guest on August-19-2021

Code answers related to "tkinter bind to window close"

Python Answers by Framework

Browse Popular Code Answers by Language