tkinterScrolling widgets


Scrollbars can be added to Listbox, Canvas, and Text widgets. In addition, Entry widgets can be scrolled horizontally. To be able to scroll other type of widgets, you need to put them inside a Canvas or a Text widget.


  • scrollbar = tk.Scrollbar(parent, **kwargs)


parenttkinter widgets exist in a hierarchy. Except for the root window, all widgets have a parent. Some online tutorials call this "master". When the widget is added to the screen with pack, place or grid, it will appear inside this parent widget
orientOrientation of the scrollbar, either "vertical" (default value) or "horizontal"


These examples assume that tkinter has been imported with either import tkinter as tk (python 3) or import Tkinter as tk (python 2).