Tk's default Toplevel - counterintuitive
Fredrik Lundh
fredrik at pythonware.com
Fri Aug 20 09:38:53 EDT 1999
Guido van Rossum <guido at cnri.reston.va.us> wrote:
> Actually, the accepted idiom (all over the place in code I write) is
>
> toplevel_window.protocol("WM_DELETE_WINDOW", close_callback)
>
> The close_callback function takes no arguments. In simple cases, you
> can use
>
> root.protocol("WM_DELETE_WINDOW", root.destroy)
>
> or
>
> root.protocol("WM_DELETE_WINDOW", root.quit)
how about making the destroy variant the
default?
</F>
More information about the Python-list
mailing list