mirror of
https://github.com/python/cpython.git
synced 2026-06-28 20:00:46 +00:00
Replace the previously sparse reference documentation with full coverage of the public API of the tkinter package, written from the Tcl/Tk manual pages, the existing documentation and the module docstrings. * Doc/library/tkinter.rst gains a "Reference" section documenting every public class, method, function and constant of the core module -- the widgets, the Misc, Wm, Pack, Place, Grid, XView and YView mix-ins, the Variable and image classes, the module-level functions and the symbolic constants. * Doc/library/tkinter.ttk.rst, dialog.rst, tkinter.font.rst and the other module pages document their remaining classes, methods and functions. The descriptions are Python-oriented (correct return types -- tuples rather than Tcl lists, booleans, integers, None on cancellation, and so on) and were checked against the Tcl/Tk 9.1 manual pages and the implementation. versionadded, versionchanged and deprecated directives are added for the public API, determined from the git history relative to Python 3.0: the tkinter.ttk module (3.1); the Text, Wm, Menu and Misc methods exposing Tk 8.5 features (3.3); and the many later additions and behavior changes up to 3.15. The Tk version required by features added after Tk 8.6 is noted as well. The bundled Tcl/Tk version is updated to 9.0 and the manual-page links point at the tcl9.0 reference. -------- (cherry picked from commit8b270b72a2) * gh-86726: Adjust tkinter docs for the 3.14 backport Remove documentation of API added only in 3.15 (the grid_content/ pack_content/place_content aliases, Text.search_all, the search nolinestop/strictlimits parameters and Event.user_data/detail), date the wm_attributes positional-argument deprecation to 3.13, and update the bundled Tcl/Tk version to 8.6. --------- (cherry picked from commit1141d294ee) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
38 lines
1.2 KiB
ReStructuredText
38 lines
1.2 KiB
ReStructuredText
:mod:`!tkinter.scrolledtext` --- Scrolled text widget
|
|
=====================================================
|
|
|
|
.. module:: tkinter.scrolledtext
|
|
:synopsis: Text widget with a vertical scroll bar.
|
|
|
|
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
|
|
|
|
**Source code:** :source:`Lib/tkinter/scrolledtext.py`
|
|
|
|
--------------
|
|
|
|
The :mod:`tkinter.scrolledtext` module provides a class of the same name which
|
|
implements a basic text widget which has a vertical scroll bar configured to do
|
|
the "right thing." Using the :class:`ScrolledText` class is a lot easier than
|
|
setting up a text widget and scroll bar directly.
|
|
|
|
The text widget and scrollbar are packed together in a :class:`~tkinter.Frame`,
|
|
and the methods of the :class:`~tkinter.Pack`, :class:`~tkinter.Grid` and
|
|
:class:`~tkinter.Place` geometry managers are acquired from the
|
|
:class:`~tkinter.Frame` object.
|
|
This allows the :class:`ScrolledText` widget to be used directly to achieve
|
|
most normal geometry management behavior.
|
|
|
|
Should more specific control be necessary, the following attributes are
|
|
available:
|
|
|
|
.. class:: ScrolledText(master=None, **kw)
|
|
|
|
|
|
.. attribute:: frame
|
|
|
|
The frame which surrounds the text and scroll bar widgets.
|
|
|
|
|
|
.. attribute:: vbar
|
|
|
|
The scroll bar widget.
|