VtScale(VTCL)

VtScale(VTCL)


VtScale -- create graphical scale based on current value of field, return widget name

Syntax

VtScale object_name [options]

Description

Creates a scale which consists of a bar with a graphical representation that shows the current numerical value of the field. Returns the widget name.

For example:

VtScale $form.scale -min 0 -max 100 -value 50 

Options

-callback cmd (C)
Called when the value of scale is changed. The value of the scale at the time of the callback will be passed as part of the callback data. The key to reference is ``value''.

Additional callback keys:

value
value of the scale

-horizontal (CS)
Sets the orientation to horizontal.

-length integer (CS)
Sets the length of the scale (specified in number of characters) to integer characters (in the character environment). In the graphical environment, sets the length of the scale to integer multiplied by the maximum font width.

-max integer (CSG)
Sets the maximum value that a scale can have.

-min integer (CSG)
Sets the minimum value that a scale can have.

-readOnly (C)
Flag: if set, the slider is disabled.

-showValue boolean (CSG)
When TRUE, the VtScale's value is shown above the scale. The default is TRUE.

-title string (C)
Sets the title string displayed at the bottom of the scale.

-value integer (CSG)
Sets the current value (restricted in range from min to max.)

-vertical (CS)
Sets the orientation to vertical.

See also