Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- from tkinter import messagebox
- root = tk.Tk()
- def save():
- print('Прогресс сохранен')
- def on_closing():
- if messagebox.askyesno("Выход", "Сохранить прогресс?"):
- save()
- root.destroy()
- root.protocol("WM_DELETE_WINDOW", on_closing)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement