Scrolling Commands |
||||
|
When the user interacts with the scrollbar, for example by dragging the slider, the scrollbar notifies the associated widget that it must change its view. The scrollbar makes the notification by evaluating a command generated from the scrollbar's #:command option. The command may take any of the following forms. In each case, (#<widget> 'yview 'moveto fraction) Fraction is a real number between (#<widget> 'yview 'scroll number units) The widget should adjust its view by number units. The units are defined in whatever way makes sense for the widget, such as characters or lines in a text widget. Number is either (#<widget> 'yview 'scroll number pages) The widget should adjust its view by number pages. It is up to the widget to define the meaning of a page; typically it is slightly less than what fits in the window, so that there is a slight overlap between the old and new views. Number is either |