Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tkinter #bind #window #close
ADD COMMENT
Topic
Name
9+9 =