yview

This command is used to query and change the vertical position of the text in the widget's window. It can take any of the following forms:

(#<widget> 'yview)
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the listbox element at the top of the window, relative to the listbox as a whole (0.5 means it is halfway through the listbox, for example). The second element gives the position of the listbox element just after the last one in the window, relative to the listbox as a whole. These are the same values passed to scrollbars via the -yscrollcommand option.
(#<widget> 'yview index)
Adjusts the view in the window so that the element given by index is displayed at the top of the window.
(#<widget> 'yview 'moveto fraction)
Adjusts the view in the window so that the element given by fraction appears at the top of the window. Fraction is a fraction between 0 and 1; 0 indicates the first element in the listbox, 0.33 indicates the element one-third the way through the listbox, and so on.
(#<widget> 'yview 'scroll number what)
This command adjusts the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages. If what is units, the view adjusts up or down by number lines; if it is pages then the view adjusts by number screenfuls. If number is negative then earlier elements become visible; if it is positive then later elements become visible.

© Author | Home | Sitemap