List Info

Thread: Re: Trapping event for Toplevel()




Re: Trapping event for Toplevel()
country flaguser name
United States
2007-08-08 10:37:52
Thanks, it's exactly what I needed.

Gerardo


On Tue, 7 Aug 2007, Cameron Laird wrote:

> On Tue, Aug 07, 2007 at 11:08:30AM -0400, Gerardo
Juarez wrote:
> 			.
> 			.
> 			.
> > I would like to know if there is a way to trap the
kill button event in a 
> > Toplevel window. I'm having problems with a dialog
which has a "Close" 
> > button, but users keep closing it with the kill
button (the big X at the 
> > upper right corner). After such a close, the
application refuses to 
> > re-open the dialog, throwing instead an
exception:
> > 
> > File
"C:PYTHON24liblib-tkTkinter.py", line 1541, in
wm_withdraw
> >    return self.tk.call('wm', 'withdraw', self._w)
> > TclError: bad window path name
".14221680"
> > 
> > My guess is that I must trap the kill event as
well but I don't know how 
> > to do it.
> 			.
> 			.
> 			.
> Read about WM_DELETE_WINDOW in <URL:
> http://effbot.org/tkinterbook/tkinter-events-and-bi
ndings.htm >
> or <URL:
> http://www.astro.washington.edu/owen/Tki
nterSummary.html#ProtocolHandler >.
> 

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discusspython.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )