Tkinter - tracking toplevel windows

Andrew Wheatley awheat at imaging.robarts.ca
Mon Apr 7 14:23:13 EDT 2003


I have a Tkinter Gui with a button which generates other toplevel windows.
Whenever a toplevel is generated, I append its id to a global list.  What I'd like
to do with wm_protocol/WM_DELETE_WINDOW method is remove from the list
the window id currently being killed and then destroy the window.

My question is:

How can I tell which window is being destroy when I kill it with the X in the 
top right hand corner.




More information about the Python-list mailing list