Hi,
Try this:
<code>
self.aboutdialog = gtk.AboutDialog()
self.aboutdialog.set_version('0.0.1')
response = self.aboutdialog.run()
self.aboutdialog.hide()
</code>
Seeing as gtk.AboutDialog inherits from gtk.Dialog, the "right way" to
use it would be to call the run() method - which automatically calls
show() - and then call its hide() method, because the program will block
until the dialog's run() returns.
"response" will differ depending on how the dialog was closed: -6 for
the "Close" button and -4 for the closing it with the X (for example in
Gnome). A quick lookup ("[(a, int(getattr(gtk, a))) for a in dir(gtk) if
a.startswith('RESPONSE_')]") reveals that those responses are
gtk.RESPONSE_CANCEL (-6) and gtk.RESPONSE_DELETE_EVENT.
Ronaldo Nascimento wrote:
Code
self.aboutdialog = gtk.AboutDialog()
self.aboutdialog.set_version('0.0.1')
self.aboutdialog.show()
How do i get the "close" button to hide the dialog?
thanks
--
Ronaldo Nascimento
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
------------------------------------------------------------------------
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
begin:vcard
fn:Walter Leibbrandt
n:Leibbrandt;Walter
org:Translate.org.za
adr:;;;Pretoria;Gauteng;;South Africa
email;internet:[EMAIL PROTECTED]
title:Developer
tel;work:(012) 460 1095
x-mozilla-html:FALSE
url:http://translate.org.za
version:2.1
end:vcard
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/