Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cca5145
gh-59551: Document the full public API of tkinter
serhiy-storchaka Jun 17, 2026
9d7c91e
gh-59551: Do not document tkinter aliases separately
serhiy-storchaka Jun 17, 2026
77f3ae0
gh-59551: Document tkinter aliases as hidden :no-typesetting: anchors
serhiy-storchaka Jun 17, 2026
303589e
gh-59551: Replace the ['_noarg_'] sentinel with two tkinter signatures
serhiy-storchaka Jun 17, 2026
5b2a713
gh-59551: Reformat tkinter docs with one sentence per line
serhiy-storchaka Jun 17, 2026
19f6605
gh-59551: Describe wm_ aliases like other tkinter aliases
serhiy-storchaka Jun 17, 2026
2935f81
gh-59551: Remove docs for internal ttk helpers
serhiy-storchaka Jun 17, 2026
d126ff1
gh-59551: Fix broken cross-references in tkinter docs
serhiy-storchaka Jun 17, 2026
c784350
gh-59551: Fix cross-references in the tkinter documentation
serhiy-storchaka Jun 17, 2026
f3d9376
gh-59551: Fix the remaining cross-references in the ttk documentation
serhiy-storchaka Jun 17, 2026
f1cdcd4
gh-59551: Restore wrapping in two filedialog ok_command descriptions
serhiy-storchaka Jun 17, 2026
1a8e499
gh-86726: Correct the issue number of the tkinter docs NEWS entry
serhiy-storchaka Jun 17, 2026
ab6edbd
Apply suggestions from code review
serhiy-storchaka Jun 18, 2026
3074205
gh-59551: Spell out e.g. and i.e. in the tkinter documentation
serhiy-storchaka Jun 18, 2026
1bd252f
gh-59551: Document grid_anchor only as a Misc method
serhiy-storchaka Jun 18, 2026
774052b
gh-59551: Use sentence case for section headings in the tkinter docum…
serhiy-storchaka Jun 18, 2026
01fcf71
Apply suggestions from code review
serhiy-storchaka Jun 18, 2026
3417306
gh-59551: Document the supported options of tkinter widgets and their…
serhiy-storchaka Jun 18, 2026
414cadf
Merge branch 'tk-docs' of github.com:serhiy-storchaka/cpython into tk…
serhiy-storchaka Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-59551: Use sentence case for section headings in the tkinter docum…
…entation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
  • Loading branch information
serhiy-storchaka and claude committed Jun 18, 2026
commit 774052bdea1ed679544b0bd33a620dcf2364c41e
28 changes: 14 additions & 14 deletions Doc/library/tkinter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ calls the Tcl interpreter to evaluate it. The Tcl interpreter will then call int
Tk and/or Ttk packages, which will in turn make calls to Xlib, Cocoa, or GDI.


Tkinter Modules
Tkinter modules
---------------

Support for Tkinter is spread across several modules. Most applications will need the
Expand Down Expand Up @@ -300,7 +300,7 @@ Additional modules:
.. currentmodule:: tkinter


Tkinter Life Preserver
Tkinter life preserver
----------------------

This section is not designed to be an exhaustive tutorial on either Tk or
Expand All @@ -315,7 +315,7 @@ find more detailed documentation on them, including in the official Tcl/Tk
reference manual.


A Hello World Program
A Hello World program
^^^^^^^^^^^^^^^^^^^^^

We'll start by walking through a "Hello World" application in Tkinter. This
Expand Down Expand Up @@ -356,7 +356,7 @@ responds to user input until the program terminates.



Important Tk Concepts
Important Tk concepts
^^^^^^^^^^^^^^^^^^^^^

Even this simple program illustrates the following key Tk concepts:
Expand Down Expand Up @@ -388,7 +388,7 @@ event loop
isn't running the event loop, your user interface won't update.


Understanding How Tkinter Wraps Tcl/Tk
Understanding how Tkinter wraps Tcl/Tk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When your application uses Tkinter's classes and methods, internally Tkinter
Expand Down Expand Up @@ -601,13 +601,13 @@ A number of special cases exist:
called from the thread that created the Tcl interpreter.


Handy Reference
Handy reference
---------------


.. _tkinter-setting-options:

Setting Options
Setting options
^^^^^^^^^^^^^^^

Options control things like the color and border width of a widget. Options can
Expand Down Expand Up @@ -681,7 +681,7 @@ their values. This is meant only as an example.

.. _pack-the-packer:

The Packer
The packer
^^^^^^^^^^

.. index:: single: packing (widgets)
Expand Down Expand Up @@ -716,7 +716,7 @@ the main application window is resized. Here are some examples::
fred.pack(expand=1)


Packer Options
Packer options
^^^^^^^^^^^^^^

For more extensive information on the packer and the options that it can take,
Expand Down Expand Up @@ -798,7 +798,7 @@ For example::
myapp = App(root)
myapp.mainloop()

The Window Manager
The window manager
^^^^^^^^^^^^^^^^^^

.. index:: single: window manager (widgets)
Expand Down Expand Up @@ -844,7 +844,7 @@ Here are some examples of typical usage::
myapp.mainloop()


Tk Option Data Types
Tk option data types
^^^^^^^^^^^^^^^^^^^^

.. index:: single: Tk Option Data Types
Expand Down Expand Up @@ -923,7 +923,7 @@ wrap

.. _Bindings-and-Events:

Bindings and Events
Bindings and events
^^^^^^^^^^^^^^^^^^^

.. index::
Expand Down Expand Up @@ -994,7 +994,7 @@ they are denoted in Tk, which can be useful when referring to the Tk man pages.
+----+---------------------+----+---------------------+


The index Parameter
The index parameter
^^^^^^^^^^^^^^^^^^^

A number of widgets require "index" parameters to be passed. These are used to
Expand Down Expand Up @@ -1071,7 +1071,7 @@ wherever the image was used.

.. _tkinter-file-handlers:

File Handlers
File handlers
-------------

Tk allows you to register and unregister a callback function which will be
Expand Down
28 changes: 14 additions & 14 deletions Doc/library/tkinter.ttk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Instead, use the :class:`ttk.Style <Style>` class for improved styling effects.
encountered when moving applications to use the new widgets.


Ttk Widgets
Ttk widgets
-----------

Ttk comes with 18 widgets, twelve of which already existed in tkinter:
Expand Down Expand Up @@ -99,7 +99,7 @@ Widget
Tk themed widgets and is not supposed to be directly instantiated.


Standard Options
Standard options
^^^^^^^^^^^^^^^^

All the :mod:`!ttk` Widgets accept the following options:
Expand Down Expand Up @@ -133,7 +133,7 @@ All the :mod:`!ttk` Widgets accept the following options:
+-----------+--------------------------------------------------------------+


Scrollable Widget Options
Scrollable widget options
^^^^^^^^^^^^^^^^^^^^^^^^^

The following options are supported by widgets that are controlled by a
Expand All @@ -159,7 +159,7 @@ scrollbar.
+----------------+---------------------------------------------------------+


Label Options
Label options
^^^^^^^^^^^^^

The following options are supported by labels, buttons and other button-like
Expand Down Expand Up @@ -205,7 +205,7 @@ widgets.
+--------------+-----------------------------------------------------------+


Compatibility Options
Compatibility options
^^^^^^^^^^^^^^^^^^^^^

.. tabularcolumns:: |l|L|
Expand All @@ -219,7 +219,7 @@ Compatibility Options
| | affect this option. |
+--------+----------------------------------------------------------------+

Widget States
Widget states
^^^^^^^^^^^^^

The widget state is a bitmap of independent state flags.
Expand Down Expand Up @@ -508,7 +508,7 @@ This widget accepts the following specific options:
+---------+----------------------------------------------------------------+


Tab Options
Tab options
^^^^^^^^^^^

There are also specific options for tabs:
Expand Down Expand Up @@ -549,7 +549,7 @@ There are also specific options for tabs:
+-----------+--------------------------------------------------------------+


Tab Identifiers
Tab identifiers
^^^^^^^^^^^^^^^

The tab_id present in several methods of :class:`ttk.Notebook <Notebook>` may
Expand All @@ -563,7 +563,7 @@ take any of the following forms:
:meth:`Notebook.index`)


Virtual Events
Virtual events
^^^^^^^^^^^^^^

This widget generates a **<<NotebookTabChanged>>** virtual event after a new
Expand Down Expand Up @@ -877,7 +877,7 @@ This widget accepts the following specific options:
Tk 9.1 added the *rowheight* and *headingheight* options.


Item Options
Item options
^^^^^^^^^^^^

The following item options may be specified for items in the insert and item
Expand Down Expand Up @@ -906,7 +906,7 @@ widget commands.
+--------+---------------------------------------------------------------+


Tag Options
Tag options
^^^^^^^^^^^

The following options may be specified on tags:
Expand All @@ -927,7 +927,7 @@ The following options may be specified on tags:
+------------+-----------------------------------------------------------+


Column Identifiers
Column identifiers
^^^^^^^^^^^^^^^^^^

Column identifiers take any of the following forms:
Expand All @@ -951,7 +951,7 @@ then data column n is displayed in column #n+1. Again, **column #0 always
refers to the tree column**.


Virtual Events
Virtual events
^^^^^^^^^^^^^^

The Treeview widget generates the following virtual events.
Expand Down Expand Up @@ -1291,7 +1291,7 @@ ttk.Treeview

.. _TtkStyling:

Ttk Styling
Ttk styling
-----------

Each widget in :mod:`!ttk` is assigned a style, which specifies the set of
Expand Down
Loading