expander

Name

expander -- A container, which can hide its child widget.

Synopsis

expander [-option value...]

Screenshot

Options

-child

type: widget-ID

Widget ID of the child.

-expand

type: boolean (default: 0)

Whether the child is expanded (shown).

-label

type: percent-string (default: "")

Label of the expander.

-onDestroy

type: string (default: "")

Tcl command which is executed if the widget is destroyed. Before evaluation the following percent strings are substituated: TABLE %% | % %w | widget name. TABLE

-visible

type: 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 dialog. 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 

results in

See also

GtkExpander