[pygtk] hide on delete_event()

Peyman paskari007 at yahoo.ca
Sat Dec 6 00:31:30 WST 2008


Hi guys, thanks for the speedy reply.

I have tried every variation, but I will try it once again...Nope,  
still doesn't work. I tried returning: True, False, 0, 1, gtk.TRUE,  
and gtk.FALSE

Am I supposed to do something after closing the window? For example,  
after I click 'x' to close it, can I immediately open it, or do I have  
to call some function before doing so. Every website I've browsed  
makes this seem like a straight forward procedure, but I keep getting  
stonewalled here.

Cheers

Peyman Askari

On 5 Dec 2008, at 15:21, Timo wrote:

> Peyman schreef:
>> Hello
>>
>> I am new to this mailing list. Originally I was posting to the  
>> glade  mailing list
>>
>> My question is a simple one, I want my window to hide when I close  
>> it  (by clicking 'x'). I have browsed the web and the answer  
>> appears to be
>>
>> def on_window_delete_event(widget,data,wtree):
>> 		print "If you can read this, then everything should work fine"
>>
>> 		widget.hide()
>> 		return gtk.TRUE
>>
>>
> I don't know if it matters, but try
> return True
> instead of return gtk.TRUE.
>
>> But when I do this very exact thing it still gets destroyed. And  
>> later  when I call the drawingArea widget (inside the window) it  
>> claims there  is no such widget.
>>
>> Anyone else run into this problem?
>>
>> Thank You
>>
>>
>> Peyman Askari
>> _______________________________________________
>> pygtk mailing list   pygtk at daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>



More information about the pygtk mailing list