org.gnome.gtk

## Class Expander

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Container
          - - org.gnome.gtk.Bin
            - - org.gnome.gtk.Expander

-     public class Expander
      extends Bin

  A Container that can hide its child. It can be in two states: one, called "expanded", where the child Widget is shown; and another where the child Widget is "hidden". In both states, it shows a control, usually a little triangle, that the user can click to change between both states, i.e. to alternatively show or hide the child.

  This Container is useful for hiding advanced options from a Dialog, while still providing a way to let users access those options. You usually specify a text label that is show near the expander triangle that contains a brief description of the hidden elements.

  To add the child Widget, you should use the Container `add()` method, as follows:

       Widget advancedOptionsWidget;
       Expander advancedOptions;

       // create a Widget with some options we want to hide
       advancedOptionsWidget = ...
       advancedOptions = new Expander("Advanced Options");
       advancedOptions.add(advancedOptionsWidget);

  Note that the child Widget is hidden by default, you can use the `setExpanded()` method to show it from the beginning.
  Since:
    4.0.7
  Author:
    Vreixo Formoso

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Expander(String label)` Create a new Expander with the given label.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getExpanded()` Get the expanded state of this Expander, i.e., whether its child is shown or hidden.
    `void` | `setExpanded(boolean expanded)` Set the state of this Expander.

    - ### Methods inherited from class org.gnome.gtk.Bin

      `getChild`

    - ### Methods inherited from class org.gnome.gtk.Container

      `add, getChildren, remove, setBorderWidth`

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Expander

          public Expander(String label)

      Create a new Expander with the given label. Underscore characters will be interpreted as marking mnemonic keys.
      Since:
        4.0.7

  - ### Method Detail

    - #### getExpanded

          public boolean getExpanded()

      Get the expanded state of this Expander, i.e., whether its child is shown or hidden.
      Since:
        4.0.7

    - #### setExpanded

          public void setExpanded(boolean expanded)

      Set the state of this Expander.
      Parameters:
        `expanded` - `true` to show the child Widget, `false` to hide it.
      Since:
        4.0.7