Re: changing expand/fill pane parameters (without repacking)



Jef Driesen wrote:
stian nixia no wrote:
Is it possible to change the expand/fill parameters of a paned's children
without repacking them?
(Repacking them is a huge performance hit)
http://www.gtk.org/api/2.6/gtk/GtkPaned.html

See the "Child Properties" section.
The child gets the two properties you question about. You can set them
using g_object_set(). Atleast that is what the API says.

Does anyone know how to use those "Child Properties"?

When I try to use this code:

g_object_set(m_expander->gobj(),
    "expand", TRUE,
    NULL
);

I get an error at runtime:

GLib-GObject-WARNING **: IA__g_object_set_valist: object class `gtkmm__GtkExpander' has no property named `expand'

I'm using gtkmm and the m_expander object is a Gtk::Expander packed inside a Gtk::VBox.

To answer my own question: I simply need to use another function for "Child Properties". It's in the documentation [1], but I didn't find it directly!

gtk_container_child_set(
   GTK_CONTAINER (m_expander->gobj()), GTK_WIDGET (m_vbox->gobj()),
   "expand", TRUE,
   NULL
);

[1] http://developer.gnome.org/doc/API/2.0/gtk/GtkContainer.html#child-properties




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