Extending PyGTK widgets with Glade

Adam Tauno Williams awilliam at whitemice.org
Fri Jan 20 16:21:04 EST 2012


Quoting Richard Carlson <rcarlson.cs at gmail.com>:
> I'm working on a program using PyGTK and Glade.  I create a glade XML file
> using Glade Designer and then load widgets like this:
> class MyDialog:
>     def __init__(self):
>         self.dialog = gtk.glade.XML(self.GLADEFILE).get_widget
> ("dialog.xml")
> I think it would be better if I extended the Dialog class, but I can't
> figure out how to do it.  I'd like to do something like this:
> class MyDialog(gtk.Dialog):
>     def __init__(self):
>         self = gtk.glade.XML(self.GLADEFILE).get_widget("example_dialog")
>
> Can someone point me in the right direction?

There is some documentation about this around somewhere; but I don't  
recall offhand.  In any case you will probably get a good answer if  
you ask on the pygtk maillist.
<http://www.daa.com.au/mailman/listinfo/pygtk>
Content on that list is pretty good.




More information about the Python-list mailing list