• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1:mod:`tkinter.scrolledtext` --- Scrolled Text Widget
2====================================================
3
4.. module:: tkinter.scrolledtext
5   :platform: Tk
6   :synopsis: Text widget with a vertical scroll bar.
7
8.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
9
10**Source code:** :source:`Lib/tkinter/scrolledtext.py`
11
12--------------
13
14The :mod:`tkinter.scrolledtext` module provides a class of the same name which
15implements a basic text widget which has a vertical scroll bar configured to do
16the "right thing."  Using the :class:`ScrolledText` class is a lot easier than
17setting up a text widget and scroll bar directly.
18
19The text widget and scrollbar are packed together in a :class:`Frame`, and the
20methods of the :class:`Grid` and :class:`Pack` geometry managers are acquired
21from the :class:`Frame` object.  This allows the :class:`ScrolledText` widget to
22be used directly to achieve most normal geometry management behavior.
23
24Should more specific control be necessary, the following attributes are
25available:
26
27.. class:: ScrolledText(master=None, **kw)
28
29
30   .. attribute:: frame
31
32      The frame which surrounds the text and scroll bar widgets.
33
34
35   .. attribute:: vbar
36
37      The scroll bar widget.
38