beetlebug▾
/

spinbox xview

Reads or changes the horizontal view of a text longer than the spinbox.

PATHNAME xview
PATHNAME xview INDEX
PATHNAME xview moveto FRACTION
PATHNAME xview scroll N WHAT

Description

With no argument, gives two fractions: the first and the last visible part of the text, from 0 to 1. With INDEX, shows that character at the left side. moveto shows the text from FRACTION. scroll moves the view by N units (characters) or N pages (widths of the spinbox). A scrollbar calls these forms with its -command.

Returns

Two fractions with no argument, else an empty string.

Examples

# An empty spinbox shows all of its text.
% spinbox .xv
> .xv xview
0.0 1.0

% spinbox .xv2
> .xv2 xview moveto 0.5

Errors

% spinbox .xv3; .xv3 xview bogus
bad spinbox index "bogus"
-errorcode NONE

Facts

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

See also