When the user manipulates a scrollbar, the scrollbar
calls its command
callback. The
arguments to this call depend on what the user does:
When the user requests a movement of one “unit” left or up, for example by clicking button B1 on the left or top arrowhead, the arguments to the callback look like:
command
("scroll", -1, "units")
When the user requests a movement of one unit right or down, the arguments are:
command
("scroll", 1, "units")
When the user requests a movement of one page left or up:
command
("scroll", -1, "pages")
When the user requests a movement of one page right or down:
command
("scroll", 1, "pages")
When the user drags the slider to a value
in the range [0,1], where 0 means all the way left or
up and 1 means all the way right or down, the call is:f
command
("moveto",f
)
These calling sequences match the arguments expected
by the .xview()
and
.yview()
methods of canvases,
listboxes, and text widgets. The
Entry
widget does not have an
.xview()
method. See Section 8.1, “Scrolling an Entry
widget”.