Name
xview, yview
Synopsis
t.xview([...])
t.yview([...])
xview
and
yview handle scrolling in horizontal and vertical
directions respectively, and accept several different patterns of
arguments. t
.xview( ),
without arguments, returns a tuple of two floats between
0.0 and 1.0 indicating the
fraction of t’s contents
corresponding to the first (leftmost) and last (rightmost) currently
visible columns.
t
.xview(MOVETO,frac
)
scrolls t left or right so that the first
(leftmost) visible column becomes the one corresponding to fraction
frac of
t’s contents, between
0.0 and 1.0.
yview supports the same patterns of arguments, but
uses lines rather than columns, and scrolls up and down rather than
left and right. yview supports one more pattern of
arguments:
t
.yview(
i
),
for any index i, scrolls
t up or down so that the first (topmost)
visible line becomes the one of index i.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access