Name

scale

scale pathName [option value...]

The scale command creates a new scale widget named pathName. A scale is a widget that displays a rectangular trough and a small slider. The position of the slider selects a particular real value.

Standard Options

-activebackground

-background

-borderwidth

-cursor

-font

-foreground

-highlightbackground

-highlightcolor

-highlightthickness

-orient

-relief

-repeatdelay

-repeatinterval

-takefocus

-troughcolor

Widget-Specific Options

-bigIncrement value (bigIncrement, BigIncrement)

Real number for “large” increments of the scale. Default (or if set to 0) is one-tenth the range of the scale.

-command tclCommand (command, Command)

Command to invoke whenever the scale’s value is changed. The scale’s new value will be appended as an argument.

-digits integer (digits, Digits)

How many significant digits should be retained when converting scale’s value to a string. If integer is zero or less, Tk chooses the smallest value that guarantees each position is unique.

-from value (from, From)

Real value limit for the left or top end of the scale.

-label string (label, Label)

Text string to label the scale. Label is displayed just to the right of the top end of vertical scales and just to the left of horizontal scales.

-length size (length, Length)

Desired long dimension, in screen units, for the scale.

-resolution value (resolution, Resolution)

Real value specifying the resolution of the scale. Defaults to 1 (i.e., the scale’s value will be integral).

-showvalue boolean (showValue, ShowValue ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.