type: string
Name of the widget, can be used to set options in an rc file.
type: ONEOF vertical, horizontal (default: horizontal)
Orientation of the toolbar.
type: boolean (default: 1)
Whether or not the item is sensitve to user input.
type: ONEOF icons, text, both (default: both)
Whether to show the icons of the items, their text or both.
type: boolean (default: 1)
Whether or not the item is visible.
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.
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.
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 gnocl::window -title "ToolBar" -child $toolBar
results in