beetlebug▾
/

scale set

Sets the value of the scale.

PATHNAME set VALUE

Description

Moves the slider to VALUE. The scale limits the value to the range of -from and -to, rounds it by -resolution, and sets the variable of -variable. It runs no -command. A scale with -state disabled keeps its value.

Returns

An empty string.

Examples

% scale .se -to 100
> .se set 400
> .se get
100

Errors

% scale .se2; .se2 set
wrong # args: should be ".se2 set value"
-errorcode NONE

% scale .se3; .se3 set high
expected floating-point number but got "high"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also