[Glade-users] working with fixed widgets
virtualex at linuxoid.net
virtualex at linuxoid.net
Fri Oct 1 17:57:52 EDT 2010
>
> In Glade I created a few windows each having a fixed container and a few
> few fields inside. In my python code, I create few labels manually, like
> this:
> myLabel = gtk.Label("This is label")
> fixed.put(myLabel, 10, 200)
> myLabel.show()
>
> When I .hide() the window that has manually created fields, do those
> fields get destroyed? I thought they wouldn't, but when I .show() the
> window again and do myLabel.set_label("New Text") without doing myLabel =
> gtk.Label(), it complaints that myLabel is referenced before assignment.
> Does it mean manually created labels get destroyed when window they are in
> becomes hidden via .hide() ?
No, all the child widgets should stay referenced for the life of their
container. Make sure myLabel variable has proper scope and not getting
reassigned somewhere.
More information about the Glade-users
mailing list