[pygtk] closing dialog box
akbar
tuxer at myrealbox.com
Wed Aug 30 19:23:12 WST 2006
On Mon, 2006-08-28 at 17:31 -0700, Christopher Spears wrote:
> I wrote a script that creates a window with a button.
> If the button is pressed, a dialog box is launched.
> Here is the script:
>
> #!/usr/bin/python
>
> import pygtk
> pygtk.require('2.0')
>
> import gtk, gtk.glade
>
> class HelloWorldDialog:
> """A Dialog Box"""
> def on_hello_world_dialog_delete(self, widget,
> event):
> gtk.main_quit()
>
> def close_dialog(self, widget):
> print "I clicked the close button!"
> gtk.main_quit()
>
just use destroy() or hide() instead of gtk.main_quit()
More information about the pygtk
mailing list