scrolledWindow

Name

scrolledWindow -- A window which adds scrollbars to its child.

Synopsis

scrolledWindow [-option value...]

Screenshot

Options

-borderWidth

type: integer or one of small, normal or big

Space in pixel between the children and the border of the widget.

-child

type: widget-ID

Widget ID of the child.

-data

type: string

User defined data which can be retrieved via the cget subcommand.

-name

type: string

Name of the widget, can be used to set options in an rc file.

-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

-scrollbar

type: always, never, automatic (default: automatic)

When to show scrollbars. If the value is a list of two elements, the first value is for the horizontal scrollbar and the second value for the vertical scrollbar.

-sensitive

type: boolean (default: 1)

Whether or not the item is sensitve to user input.

-visible

type: boolean (default: 1)

Whether or not the item is visible.

-xLower

type: float

This is a read-only option which returns the lower limit in horizontal direction.

-xPageSize

type: float

This is a read-only option which returns the page size horizontal direction.

-xUpper

type: float

This is a read-only option which returns the upper limit in horizontal direction.

-xValue

type: float

Value in horizontal direction.

-yLower

type: float

The same as xLower, but in vertical direction.

-yPageSize

type: float

The same as xPageSize, but in vertical direction.

-yUpper

type: float

The same as xUpper, but in vertical direction.

-yValue

type: float

The same as xValue, but in vertical direction.

Description

The scrolledWindow widget adds scrollbar to its child.

Commands

id cget option

Returns the value for one option. The option may have any of the values accepted by configure.

id configure [-option value...]

Configures the widget. Option may have any of the values accepted on creation of the widget.

id delete

Deletes the widget and the associated tcl command.

Example


set box [gnocl::box -orientation vertical]
foreach el {1 2 3 4 5 6} {
   $box add [gnocl::button -text "Button $el"]
}
set scrollWin [gnocl::scrolledWindow -child $box]
gnocl::window -title "ScrolledWindow" -child $scrollWin -defaultWidth 200

results in

See also

GtkScrolledWindow