PyDocs

Nav

Graphical user interfaces with Tk

Scrollbar

tkinter

class
  • Scrollbar(master=None, cnf={}, **kw)
A Scrollbar widget displays a slider and two arrows that let the user scroll an associated widget, such as a Listbox, Text, Canvas or Entry. It is connected to the scrolled widget by setting that widget’s xscrollcommand or yscrollcommand option to the scrollbar’s set() method, and the scrollbar’s command option to the scrolled widget’s xview() or yview() method. Inherits from Widget.
Members of Scrollbar

a

activate
Mark the element index (one of 'arrow1', 'slider' or 'arrow2') as active, displaying it according to the activebackground and activerelief options.

d

delta
Return a float indicating the fractional change in the scrollbar setting that corresponds to moving the slider by deltax pixels horizontally (for horizontal scrollbars) or deltay pixels vertically (f…

f

fraction
Return a float between 0 and 1 indicating where the point at pixel coordinates x, y lies in the trough: 0 corresponds to the top or left of the trough and 1 to the bottom or right.

g

get
Return the current scrollbar settings as a tuple (first, last) of two fractions between 0 and 1, describing the portion of the document that is currently visible, as last passed to set().

i

identify
Return the name of the element under the pixel coordinates x, y (such as 'arrow1'), or an empty string if the point does not lie in any element of the scrollbar.

s

set
Set the scrollbar.
0 Examples
No examples for tkinter/Scrollbar.
See Also
No see-alsos for tkinter/Scrollbar
0 Notes
No notes for Scrollbar