toolBar

Name

toolBar  -- A toolbar container widget.

Synopsis

toolBar [-option value...]

Screenshot

Options

-name

type: string

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

-orientation

type: ONEOF vertical, horizontal (default: horizontal)

Orientation of the toolbar.

-sensitive

type: boolean (default: 1)

Whether or not the item is sensitve to user input.

-style

type: ONEOF icons, text, both (default: both)

Whether to show the icons of the items, their text or both.

-visible

type: boolean (default: 1)

Whether or not the item is visible.

Description

A toolbar is a container widget normally placed at the top of the main window, directly below the menubar. It can contain special toolbar items or even normal widgets.

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 add type [-option value...]

Add a item of type type to the toolbar. Type can be one of space, item, checkItem, radioItem or widget. The options are dependent of the item type. Type space inserts additional space between the items. It is not explained further since it does not have any options.

id addBegin type [-option value...]

Synonym for add.

id addEnd type [-option value...]

Add widgets at the end of the toolbar.

Example

set toolBar [gnocl::toolBar]
$toolBar add item -text "%#Quit" -onClicked exit
$toolBar add space
$toolBar add checkItem -text "%#Underline" -variable underline
$toolBar add space
$toolBar add radioItem -text "%#JustifyLeft" -variable justify -onValue left
$toolBar add radioItem -text "%#JustifyRight" -variable justify -onValue right

set ent [gnocl::entry]
$toolBar add widget $ent
$toolBar add item -text "%#Find"

gnocl::window -title "ToolBar" -child $toolBar

results in

See also

toolBar item, toolBar checkItem, toolBar radioItem, GtkToolbar