gtk3 + python : lookup_widget



Hi,

I'm having a little trouble finding examples online of using the
equivalent of lookup_widget() with gtk3 + python.

For example in the following code what is the best way to modify the
"message" label after the "commandline" callback is sent?

Should I be using globals or a glade file or is there a way to dynamically
lookup the "message" widget ?



def create_gtkEntry():

    commandline = Gtk.Entry()
    commandline.connect("activate", command_entered, 1)

    messages = Gtk.Label('TEST')



def command_entered(self, *args):

    cmi_command = self.get_text()
    messages.set_text(cmi_command)
    print "command entered: ", args[0]



--
Patrick Shirkey
Boost Hardware Ltd



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]