Tkinter frame items?

Fredrik Lundh fredrik at effbot.org
Tue Dec 5 16:20:33 EST 2000


Sam Schulenburg wrote:
> I have a Tkinter program under windows2000 where I have added a quit
> menu item to exit the program, with a prompt to the user to verify the
> desire to exit. My problem is that the user can still click the upper
> right exit square and close the program. I would like to capture the
> event triggered by clicking on this item.

you can use a WM_DELETE_WINDOW handler.  see example 7-2
under "protocols" on this page:

http://www.pythonware.com/library/tkinter/introduction/events-and-bindings.htm

cheers /F





More information about the Python-list mailing list