gtkExpanderNew(label = NULL, show = TRUE)
gtkExpanderNewWithMnemonic(label = NULL)
gtkExpanderSetExpanded(object, expanded)
gtkExpanderGetExpanded(object)
gtkExpanderSetSpacing(object, spacing)
gtkExpanderGetSpacing(object)
gtkExpanderSetLabel(object, label = NULL)
gtkExpanderGetLabel(object)
gtkExpanderSetUseUnderline(object, use.underline)
gtkExpanderGetUseUnderline(object)
gtkExpanderSetUseMarkup(object, use.markup)
gtkExpanderGetUseMarkup(object)
gtkExpanderSetLabelWidget(object, label.widget = NULL)
gtkExpanderGetLabelWidget(object)
gtkExpander(label = NULL, show = TRUE)
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkExpander
GtkBuildable
.GtkExpander
allows the user to hide or show its child by clicking
on an expander triangle similar to the triangles used in a GtkTreeView
. Normally you use an expander as you would use any other descendant
of GtkBin
; you create the child widget and use gtkContainerAdd
to add it to the expander. When the expander is toggled, it will take
care of showing and hiding the child automatically.GtkExpander
but do not add a child to it. The expander widget has an
expanded
property which can be used to monitor
its expansion state. You should watch this property with a signal
connection as follows:
expander = gtk_expander_new_with_mnemonic ("_More Options"); g_signal_connect (expander, "notify::expanded", G_CALLBACK (expander_callback), NULL); ... static void expander_callback (GObject *object, GParamSpec *param_spec, gpointer user_data) { GtkExpander *expander; expander = GTK_EXPANDER (object); if (gtk_expander_get_expanded (expander)) { /* Show or create widgets */ } else { /* Hide or destroy widgets */ } }
expander <- gtkExpanderNewWithMnemonic("_More Options") gSignalConnect(expander, "notify::expanded", expander_callback) ... expander_callback <- (expander, param_spec, user_data) { if (expander$getExpanded()) { # Show or create widgets } else { # Hide or destroy widgets } }
gtkExpander
is the equivalent of gtkExpanderNew
.expanded
[logical : Read / Write / Construct]label
[character : * : Read / Write / Construct]label-widget
[GtkWidget
: * : Read / Write]spacing
[integer : Read / Write]use-markup
[logical : Read / Write / Construct]use-underline
[logical : Read / Write / Construct]expander-size
[integer : Read]expander-spacing
[integer : Read]