[Glade-users] working with fixed widgets
- From: virtualex at linuxoid.net (virtualex at linuxoid.net)
- Subject: [Glade-users] working with fixed widgets
- Date: Fri, 1 Oct 2010 14:57:52 -0700
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]