Question

Is there a way to create 'parentless' widgets in Glade? What I mean is, for example, a table with no associated parent, so that I can assign it as a child of something else later.

What I'm trying to do is a GTK window with a 3 positions VBox, 2 of which will be static and 1 which will be dynamic. In this dynamic position I want to load a pre-defined table which will vary according to whatever I did in the static parts, like pressing X or Y buttons.

Is this possible, or do I have to create the dynamic table by code?

I'm using Ruby 1.9.3, Gtk2, and Glade3. Thanks.

Edit: I tried creating a separate window with the tables and loading one of these tables into the intended window. I got an error, apparently a Child-Parent missmatch: "Gtk-CRITICAL **:gtk_box_pack: assertion `child->parent == NULL' failed"

Was it helpful?

Solution

Yes, if you right-click on a widget in the widget palette, there is a menu item called something like "Add as toplevel widget" -- I don't have a copy of Glade handy right now to test what the name was exactly.

Then when you load your GtkBuilder file, the widget will be created without a parent, but the GtkBuilder will hold a reference to it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top