scrollbar set
Sets the visible part of the content, which the slider shows.
PATHNAME set FIRST LAST
PATHNAME set TOTAL WINDOW FIRSTUNIT LASTUNIT
Description
FIRST and LAST are the fractions from 0 to 1 of the first and the last visible part of the content of the scrolled widget. The scrollbar limits each value to the range 0 to 1, and a LAST before FIRST becomes FIRST. A scrollable widget calls set through its -xscrollcommand or -yscrollcommand.
The old form of four integers gives the count of units of the content, the count of visible units, and the first and the last visible unit.
Returns
An empty string.
Examples
% scrollbar .se
> .se set 0.2 0.6
> .se get
0.2 0.6
% scrollbar .se2
> .se2 set 1.5 2
> .se2 get
1.0 1.0
Errors
% scrollbar .se3; .se3 set 1
wrong # args: should be ".se3 set firstFraction lastFraction" or ".se3 set totalUnits windowUnits firstUnit lastUnit"
-errorcode NONE
% scrollbar .se4; .se4 set a b
expected floating-point number but got "a"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1