tkinter x button override

Matthew Dixon Cowles matt at mondoinfo.com
Wed Feb 14 21:00:36 CET 2001


On 14 Feb 2001 19:32:11 GMT, Joseph Holland King
<insanc at cc.gatech.edu> wrote:

>after creating a frame with the tkinter module, it automatically creates a
>close button (x on the top right). is there anyway to override the function
>of this button? i haven't found any documentation so far. thank you.

It's your window manager that's creating the close button but Tkinter
can handle the event. The best documentation for Tkinter that I've
found is Fredrik Lundh's excellent An Introduction to Tkinter. See
(wrapped for line length):

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

And scroll down to the section on protocols.

Regards,
Matt




More information about the Python-list mailing list