Answers for "python tkinter close window after action"

1

python detect if tkinter page closed

import tkinter as tk
from tkinter import messagebox

root = tk.Tk()

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-04-2020
6

python tkinter close gui window

from tkinter import *
root=tk.Tk()
root.destroy()
Posted by: Guest on May-01-2020

Code answers related to "python tkinter close window after action"

Python Answers by Framework

Browse Popular Code Answers by Language