Documentation‎ > ‎Containers‎ > ‎

    gnocl::expander

    A container, which can hide its child widget.

    Synopsis

    gnocl::expander [-option value...]

    Screenshot


    Options

    -child widget-ID
    Widget ID of the child.
    -expand boolean (default: 0)
    Whether the child is expanded (shown).
    -label percent-string (default: "")
    Label of the expander.
    -onDestroy string (default: "")
    Tcl command which is executed if the widget is destroyed. Before evaluation the following percent strings are substituted:

    %w    widget name
    -visible boolean (default: 1)
    Whether or not the item is visible.

    Description

    A expander widget allows the user to hide or show its child. This is, for example, useful to hide initially advanced option in a dialogue widget.

    This command is available since GTK+ 2.4.

    Commands

    id delete
    Deletes the widget and the associated tcl command.
    id configure [-option value...]
    Configures the widget. Option may have any of the values accepted on creation of the widget.
    id cget option
    Returns the value for one option. The option may have any of the values accepted by configure.

    Example

    set child [gnocl::button \
        -text "Button 1"]

    set expander [gnocl::expander \
        -label "%_E_xpander" \
        -child $child]

    set box [gnocl::box \

        -orientation vertical]

    $box add [gnocl::button \

        -text "Button 2"]

    $box add $expander


    gnocl::window -title "Expander" -child $box
    Comments

    Sections