Tomas Novotny
Tomas Novotny

Reputation: 8317

Instantiating named GTK widgets in Python

I have a simple GUI build with Glade 3 and I have a gtk.Entry widget with name "input_entry1". I would like to instantiate new gtk.Entry widget called "input_entry2" but I would like to do it simply in Python code, not with Glade, but I can't figure out how to set a name to instance of widget (or create a named widget).

Thanks a lot, Tomas

Upvotes: 1

Views: 233

Answers (1)

In C you could name your widgets using gtk_widget_set_name function. I think in Python you can use set_name method:

http://www.pygtk.org/pygtk2tutorial/sec-WidgetNameMethods.html

Upvotes: 1

Related Questions