Just getting started with PyGTK and Glade3 and would love some help.
开发者_高级运维Container Hierarchy: window -> vbox1 -> {button1 , label1}
button1 calls back to
on_button1_clicked(self, widget):
print "Hello World!" #This sends the output to the console
widget.set_label("Hello World!") #This updates button1's label
#I'd like to update label1's label as well in the same callback
I know this can be done using label1.set_text(string), but I don't know how to retrieve that object any ideas?
Thanks from KY.
label = builder.get_object('label1')
label.set_text('foobar')
精彩评论