from Tkinter import * import tkMessageBox def protocolhandler(): if tkMessageBox.askokcancel("Exit", "Wanna leave?"): if tkMessageBox.askokcancel("Exit", "Are you sure?"): if tkMessageBox.askokcancel("Exit", "Really?"): root.destroy() root = Tk() root.protocol("WM_DELETE_WINDOW", protocolhandler) root.mainloop()
18.10.Dialog | ||||
18.10.1. | OK Cancel message box | |||
18.10.2. | Color dialog | |||
18.10.3. | File dialog | |||
18.10.4. | Question dialog | |||
18.10.5. | Error dialog | |||
18.10.6. | Message box | |||
18.10.7. | Model dialog | |||
18.10.8. | Popup dialog | |||
18.10.9. | A quit button that verifies exit requests |