tkinter x button override

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

On 14 Feb 2001 19:32:11 GMT, Joseph Holland King
<insanc at> 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):

And scroll down to the section on protocols.


More information about the Python-list mailing list