canvas xview
Reads or changes the horizontal view of the canvas.
PATHNAME xview
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 width of -scrollregion, from 0 to 1. moveto shows the region from FRACTION. scroll moves the view by N units (of -xscrollincrement), N pages, or N pixels. With no -scrollregion, the fractions are 0 and 1, and a scroll moves the view with no limit.
Returns
Two fractions with no argument, else an empty string.
Examples
% canvas .xv
> .xv xview
0.0 1.0
Errors
% canvas .xv2; .xv2 xview bogus
unknown option "bogus": must be moveto or scroll
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1