tkinter.scrolledtext — Scrolled Text Widget¶
Source code:Lib/tkinter/scrolledtext.py
Thetkinter.scrolledtext module provides a class of the same name whichimplements a basic text widget which has a vertical scroll bar configured to dothe “right thing.” Using theScrolledText class is a lot easier thansetting up a text widget and scroll bar directly. The constructor is the sameas that of thetkinter.Text class.
The text widget and scrollbar are packed together in aFrame, and themethods of theGrid andPack geometry managers are acquiredfrom theFrame object. This allows theScrolledText widget tobe used directly to achieve most normal geometry management behavior.
Should more specific control be necessary, the following attributes areavailable:
ScrolledText.frame¶The frame which surrounds the text and scroll bar widgets.
ScrolledText.vbar¶The scroll bar widget.