activeBackground font insertForeground selectForeground activeForeground foreground orient state background highlightBackground troughColor borderWidth highlightColor selectBackground cursor highlightThickness selectBorderWidth disabledForeground insertBackground selectColor
See the options manual entry for details on the standard options. For widgets added to the toolbar, these options will be propogated if the widget supports the option. For example, all widgets that support a font option will be changed if the toolbar's font option is configured.
Name: balloonBackground Class: BalloonBackground Command-Line Switch: -ballooonbackground
Name: balloonDelay1 Class: BalloonDelay1 Command-Line Switch: -balloondelay1
Name: balloonDelay2 Class: BalloonDelay2 Command-Line Switch: -balloondelay2
Name: balloonFont Class: BalloonFont Command-Line Switch: -balloonfont
Name: balloonForeground Class: BalloonForeground Command-Line Switch: -ballooonforeground
Name: helpVariable Class: HelpVariable Command-Line Switch: -helpvariable
Name: orient Class: Orient Command-Line Switch: -orient
A toolbar is a widget that displays a collection of widgets arranged either in a row or a column (depending on the value of the -orient option). This collection of widgets is usually for user convenience to give access to a set of commands or settings. Any widget may be placed on a toolbar. However, command or value-oriented widgets (such as button, radiobutton, etc.) are usually the most useful kind of widgets to appear on a toolbar.
In addition, the toolbar adds two new options to all widgets that are added to it. These are the helpStr and balloonStr options. See the discussion for the widget command add below.
The toolbar command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:
pathName option ?arg arg ...?Option and args determine the exact behavior of the command.
Many of the widget commands for a toolbar take as one argument an indicator of which widget item of the toolbar to operate on. The indicator is called an index and may be specified in any of the following forms:
The following commands are possible for toolbar widgets:
toolbar .tb -helpvariable statusVar.tb add button item1 \ -helpstr "Save It" -bitmap @./icons/Tool_32_box.xbm \ -balloonstr "Save" -command {puts 1} .tb add button item2 \ -helpstr "Save It" -bitmap @./icons/Tool_32_brush.xbm \ -balloonstr "Save" -command {puts 1} .tb add button item3 \ -helpstr "Save It" -bitmap @./icons/Tool_32_cut.xbm \ -balloonstr "Save" -command {puts 1} .tb add button item4 \ -helpstr "Save It" -bitmap @./icons/Tool_32_draw.xbm \ -balloonstr "Save" -command {puts 1} .tb add button item5 \ -bitmap @./icons/Tool_32_erase.xbm -helpstr "Play It" \ -command {puts 2} .tb add frame filler \ -borderwidth 1 -width 10 -height 10 .tb add radiobutton item6 \ -bitmap @./icons/Tool_32_oval.xbm -command {puts 4} \ -variable result -value OPEN -helpstr "Radio Button # 1" \ -balloonstr "Radio" .tb add radiobutton item7 \ -bitmap @./icons/Tool_32_line.xbm -command {puts 5} \ -variable result -value CLOSED .tb add checkbutton item8 \ -bitmap @./icons/Tool_32_text.xbm -command {puts 6} \ -variable checkit -onvalue yes -offvalue no .tb add checkbutton check2 \ -bitmap @./icons/Tool_32_points.xbm -command {puts 7} \ -variable checkit2 -onvalue yes -offvalue no
pack .tb -side top -anchor nw