[Tkinter-discuss] a question on the top level window

Fredrik Lundh fredrik at pythonware.com
Tue Jun 6 12:52:26 CEST 2006


V H wrote:
> Hi all,
> 
> I use a button  to generate a toplevel window. I hope only one such window 
> is existing before I close it manually. But now each time when I click the 
> button a new window is created. How can I do?
> 
> How do I bind a function to the close of the window by clicking the cross in 
> the up-right side?

look for "WM_DELETE_WINDOW" on this page:

     http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm

</F>



More information about the Tkinter-discuss mailing list