Sets our main struct and passes it to the parent class.
Creates a new expander using label as the text of the label. Since 2.4
Queries a gtk.Expander and returns its current state. Returns TRUE if the child widget is revealed.
Get the main Gtk struct
Fetches the text from a label widget including any embedded underlines indicating mnemonics and Pango markup, as set by Expander.setLabel. If the label text has not been set the return value will be NULL. This will be the case if you create an empty button with Button.new to use as a container.
Returns whether the label widget will fill all available horizontal space allocated to expander.
Retrieves the label widget for the frame. See Expander.setLabelWidget.
Returns whether the expander will resize the toplevel widget containing the expander upon resizing and collpasing.
Gets the value set by Expander.setSpacing.
the main Gtk struct as a void*
Returns whether the label’s text is interpreted as marked up with the [Pango text markup language]PangoMarkupFormat. See Expander.setUseMarkup.
Returns whether an embedded underline in the expander label indicates a mnemonic. See Expander.setUseUnderline.
Sets the state of the expander. Set to TRUE, if you want the child widget to be revealed, and FALSE if you want the child widget to be hidden.
Sets the text of the label of the expander to label.
Sets whether the label widget should fill all available horizontal space allocated to expander.
Set the label widget for the expander. This is the widget that will appear embedded alongside the expander arrow.
Sets whether the expander will resize the toplevel widget containing the expander upon resizing and collpasing.
Sets the spacing field of expander, which is the number of pixels to place between expander and the child.
Sets whether the text of the label contains markup in [Pango’s text markup language]PangoMarkupFormat. See Label.setMarkup.
If true, an underline in the text of the expander label indicates the next character should be used for the mnemonic accelerator key.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Gets the child of the gtk.Bin, or NULL if the bin contains no child widget. The returned widget does not have a reference added, so you do not need to unref it.
A gtk.Expander allows the user to hide or show its child by clicking on an expander triangle similar to the triangles used in a gtk.TreeView
Normally you use an expander as you would use any other descendant of gtk.Bin; you create the child widget and use Container.add to add it to the expander. When the expander is toggled, it will take care of showing and hiding the child automatically.
Special Usage
There are situations in which you may prefer to show and hide the expanded widget yourself, such as when you want to actually create the widget at expansion time. In this case, create a gtk.Expander 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:
GtkExpander as GtkBuildable
The GtkExpander implementation of the GtkBuildable interface supports placing a child in the label position by specifying “label” as the “type” attribute of a <child> element. A normal content child can be specified without specifying a <child> type attribute.
An example of a UI definition fragment with GtkExpander: |[ <object class="GtkExpander"> <child type="label"> <object class="GtkLabel" id="expander-label"/> </child> <child> <object class="GtkEntry" id="expander-content"/> </child> </object>
GtkExpander has three CSS nodes, the main node with the name expander, a subnode with name title and node below it with name arrow. The arrow of an expander that is showing its child gets the :checked pseudoclass added to it.