D
D
Dmitry2014-06-22 16:47:12
Python
Dmitry, 2014-06-22 16:47:12

How to reuse a widget in Glade?

Colleagues, the problem is standard, but I can not find a solution!
I drew an interface in Glade. On the left is the element tree, on the right is the notebook bookmark panel. We select an element on the left in the tree - a bookmark is dynamically added to the right to edit this element. You can open as many bookmarks as you like.
In Glade, I drew a separate window with a view for editing an element. But HOW do I reuse this view as a template for adding a new bookmark to the notebook panel?
I'm using the GtkBuilder GTK+ 2.16 glade file format. There is a solution for regular glade faq.pygtk.org/index.py?req=show&file=faq22.011.htp , but how to repeat a similar move for Gtk.Builder?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ivlev, 2014-06-26
@ivlevdenis_ru

Separate the widget into a separate file, and use gtk.Builder.add_objects_from_file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question