blob: 1c5d761794f08345f758742728b62538a8bf5bcb [file] [log] [blame]
Georg Brandlc21cd7e2008-05-16 17:37:53 +00001:mod:`tkinter.scrolledtext` --- Scrolled Text Widget
2====================================================
Georg Brandl8ec7f652007-08-15 14:28:01 +00003
4.. module:: ScrolledText
Georg Brandlc21cd7e2008-05-16 17:37:53 +00005 :synopsis: Old name for the tkinter.scrolledtext module.
6
7.. module:: tkinter.scrolledtext
Georg Brandl8ec7f652007-08-15 14:28:01 +00008 :platform: Tk
9 :synopsis: Text widget with a vertical scroll bar.
10.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
11
Georg Brandlc21cd7e2008-05-16 17:37:53 +000012.. note::
13 The :mod:`ScrolledText` module has been renamed to
14 :mod:`tkinter.scrolledtext` in Python 3.0. It is importable under both names
15 in Python 2.6 and the rest of the 2.x series.
Georg Brandl8ec7f652007-08-15 14:28:01 +000016
Georg Brandlc21cd7e2008-05-16 17:37:53 +000017The :mod:`tkinter.scrolledtext` module provides a class of the same name which
Georg Brandl8ec7f652007-08-15 14:28:01 +000018implements a basic text widget which has a vertical scroll bar configured to do
19the "right thing." Using the :class:`ScrolledText` class is a lot easier than
20setting up a text widget and scroll bar directly. The constructor is the same
Georg Brandlc21cd7e2008-05-16 17:37:53 +000021as that of the :class:`tkinter.Text` class.
22
23.. versionchanged:: 2.6
24 Renamed from ``ScrolledText``.
Georg Brandl8ec7f652007-08-15 14:28:01 +000025
26The text widget and scrollbar are packed together in a :class:`Frame`, and the
27methods of the :class:`Grid` and :class:`Pack` geometry managers are acquired
28from the :class:`Frame` object. This allows the :class:`ScrolledText` widget to
29be used directly to achieve most normal geometry management behavior.
30
31Should more specific control be necessary, the following attributes are
32available:
33
34
35.. attribute:: ScrolledText.frame
36
37 The frame which surrounds the text and scroll bar widgets.
38
39
40.. attribute:: ScrolledText.vbar
41
42 The scroll bar widget.