background borderwidth cursor |
highlightthickness jump orient |
relief repeatdelay repeatinterval |
takefocus |
See the "options" manual entry for details on the standard options.
Name: activeRelief
Class: ActiveRelief
Command-Line Switch: -activerelief
Specifies the relief to use when displaying the element that is active, if any. Elements other than the active element are always displayed with a raised relief.
Name: command
Class: Command
Command-Line Switch: -command
Specifies the prefix of a Tcl command to invoke to change the view in the widget associated with the scrollbar. When a user requests a view change by manipulating the scrollbar, a Tcl command is invoked. The actual command consists of this option followed by additional information as described later. This option almost always has a value such as .t xview or .t yview, consisting of the name of a widget and either xview (if the scrollbar is for horizontal scrolling) or yview (for vertical scrolling). All scrollable widgets have xview and yview commands that take exactly the additional arguments appended by the scrollbar as described in SCROLLING COMMANDS in the scrollbar manual.
Name: elementBorderWidth
Class: ElementBorderWidth
Command-Line Switch: -elementborderwidth
Specifies the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may have any of the forms acceptable to Tk_GetPixels. If this value is less than zero, the value of the borderWidth option is used in its place.
Name: mapcmd
Class: Command
Command-Line Switch: -mapcmd
Defines a callback command for colormap definition. The callback is made when the scrollbar set method is called and the range has changed. The return value of the function is used as the new color map for the scrollbar (see setmap below.)
Name: mapcolor
Class: Color
Command-Line Switch: -mapcolor
Name: width
Class: Width
Command-Line Switch: -width
Specifies the desired narrow dimension of the scrollbar window, not including 3-D border, if any. For vertical scrollbars this will be the width and for horizontal scrollbars this will be the height. The value may have any of the forms acceptable to Tk_GetPixels.
The mapscrollbar command creates a new window (given by the pathName argument) and makes it into a scrollbar widget. This widget is compatable with the standard Tk scrollbar and has the additional ability to display a colored map within the trough of the scrollbar. This colored map can be used to indicate regions of interest.
The colbutton 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 the args determine the exact behavior of the command. The following commands are possible for button widgets:
activate * |
delta * |
fraction * |
get * |
identify * |
moveto * |
scroll * |
set * |
refreshmap |
setmap |
(*) See the "scrollbar" manual entry for details on the associated methods.
frac Range is frac to frac of color -mapcolor
frac1 frac2 Range is frac1 to frac2 of color -mapcolor
frac1 frac2 color Range is frac1 to frac2 of color color
The top or left arrow in the scrollbar.
The region between the slider and arrow1.
The rectangle that indicates what is visible in the associated widget.
The region between the slider and arrow2.
The bottom or right arrow in the scrollbar.
Name: mapCanvas Class: Canvas
mtiwidgets::mapscrollbar .sb \
-orient vertical \
-mapcolor red \
-relief sunken \
-borderwidth 1
.sb setmap [list 0.2 {0.5 0.6 blue} {0.75 0.85}]
.sb set 0.1 0.3
pack .sb -expand 1 -fill y