[pygtk] about widget creation in libglade

Christian Robottom Reis kiko at async.com.br
Thu Jan 22 15:57:47 WST 2004


On Wed, Jan 21, 2004 at 11:30:02PM -0800, Sridhar R wrote:
> > Well, one way to work around this is to define the
> > gtk.Window in your
> > code, and have a dummy window defined in Glade that
> > you destroy at
> > startup:
> > 
> >     class MyWindow(gtk.Window): pass
> >     
> >     gladewin = xml.get_widget('fake_toplevel')
> >     win = MyWindow()
> >     child = gladewin.get_children()[0]
> >     child.reparent(win)
> 
>    What about the properties of fake_toplevel windows
> defined in glade.  Aren't they got lost by default
> properties of `win` instance?

Yes, they are. You can copy them manually if you like -- just go through
all them and clone them into your MyWindow instance.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331


More information about the pygtk mailing list