1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A container which can hide its child
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GtkExpander allows the user to hide or show its child by clicking on an expander triangle similar to
10 the triangles used in a #GtkTreeView.
14 Normally you use an expander as you would use any other descendant
15 of #GtkBin; you create the child widget and use
16 gtk_container_add() to add it to the expander. When the expander
17 is toggled, it will take care of showing and hiding the child
21 <section id="expander-special-usage">
22 <title>Special Usage</title>
25 There are situations in which you may prefer to show and
26 hide the expanded widget yourself, such as when you want to
27 actually create the widget at expansion time. In this case,
28 create a #GtkExpander but do not add a child to it. The
29 expander widget has an <literal>expanded</literal> property
30 which can be used to monitor its expansion state. You should
31 watch this property with a signal connection as follows:
34 <programlisting id="expander-callback-example">
35 expander = gtk_expander_new_with_mnemonic ("_More Options");
36 g_signal_connect (expander, "notify::expanded",
37 G_CALLBACK (expander_callback), NULL);
42 expander_callback (GObject *object,
43 GParamSpec *param_spec,
46 GtkExpander *expander;
48 expander = GTK_EXPANDER (object);
50 if (gtk_expander_get_expanded (expander))
52 /* Show or create widgets */
56 /* Hide or destroy widgets */
63 <!-- ##### SECTION See_Also ##### -->
68 <!-- ##### STRUCT GtkExpander ##### -->
74 <!-- ##### SIGNAL GtkExpander::activate ##### -->
79 @expander: the object which received the signal.
81 <!-- ##### ARG GtkExpander:expanded ##### -->
86 <!-- ##### ARG GtkExpander:label ##### -->
91 <!-- ##### ARG GtkExpander:label-widget ##### -->
96 <!-- ##### ARG GtkExpander:spacing ##### -->
101 <!-- ##### ARG GtkExpander:use-markup ##### -->
106 <!-- ##### ARG GtkExpander:use-underline ##### -->
111 <!-- ##### ARG GtkExpander:expander-size ##### -->
116 <!-- ##### ARG GtkExpander:expander-spacing ##### -->
121 <!-- ##### FUNCTION gtk_expander_new ##### -->
130 <!-- ##### FUNCTION gtk_expander_new_with_mnemonic ##### -->
139 <!-- ##### FUNCTION gtk_expander_set_expanded ##### -->
148 <!-- ##### FUNCTION gtk_expander_get_expanded ##### -->
157 <!-- ##### FUNCTION gtk_expander_set_spacing ##### -->
166 <!-- ##### FUNCTION gtk_expander_get_spacing ##### -->
175 <!-- ##### FUNCTION gtk_expander_set_label ##### -->
184 <!-- ##### FUNCTION gtk_expander_get_label ##### -->
193 <!-- ##### FUNCTION gtk_expander_set_use_underline ##### -->
202 <!-- ##### FUNCTION gtk_expander_get_use_underline ##### -->
211 <!-- ##### FUNCTION gtk_expander_set_use_markup ##### -->
220 <!-- ##### FUNCTION gtk_expander_get_use_markup ##### -->
229 <!-- ##### FUNCTION gtk_expander_set_label_widget ##### -->
238 <!-- ##### FUNCTION gtk_expander_get_label_widget ##### -->