Gtk / pyGtk: How to remove the close button at the top right corner of the dialog window?
John Hunter
jdhunter at ace.bsd.uchicago.edu
Fri Mar 26 10:05:49 EST 2004
>>>>> "ahk" == ahk <ahk at writeme.com> writes:
ahk> As subject. TIA. --
ahk> http://mail.python.org/mailman/listinfo/python-list
You can override the functionality of that button by connecting your
window or dialog to the delete event. Eg, if you want to hide the
window (but not close/destroy it), you can do
def hide(*args):
window.hide()
return gtk.TRUE
window.connect('delete_event', hide)
Or you can force your window to simply ignore users clicking on that
button by doing
def ignore(*args): # do nothing
return gtk.TRUE
window.connect('delete_event', ignore)
See http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq10.006.htp
JDH
More information about the Python-list
mailing list