beetlebug▾
/

text yview

Reads or changes the vertical view of the text.

PATHNAME yview
PATHNAME yview INDEX
PATHNAME yview -pickplace INDEX
PATHNAME yview moveto FRACTION
PATHNAME yview scroll N WHAT

Description

With no argument, gives two fractions: the first and the last visible part of the content, from 0 to 1. With INDEX, shows that line at the top. -pickplace shows INDEX as see does. moveto shows the content from FRACTION. scroll moves the view by N units (display lines), N pages, or N pixels.

Returns

Two fractions with no argument, else an empty string.

Examples

% text .yv
> pack .yv
> .yv insert end hello
> update
> .yv yview
0.0 1.0

Errors

% text .yv2; .yv2 yview scroll 1 bogus
bad argument "bogus": must be units, pages, or pixels
-errorcode NONE

Facts

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

See also