Skip to content
Open
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions Doc/library/tkinter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@

.. attribute:: master

The widget object that contains this widget. For :class:`Tk`, the

Check warning on line 179 in Doc/library/tkinter.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:meth reference target not found: winfo_parent [ref.meth]
*master* is :const:`None` because it is the main window. The terms
*master* and *parent* are similar and sometimes used interchangeably
as argument names; however, calling :meth:`winfo_parent` returns a
string of the widget name whereas :attr:`master` returns the object.
*parent*/*child* reflects the tree-like relationship while
*master*/*slave* reflects the container structure.
*container*/*child widget* reflects the geometry management structure.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above 'Check warning on line 179' message seems misleading because it refers to'":meth:winfo_parent" on line 182. I believe the message is true in that Misc.winfo_parent is not documented and not indexed, so no link is possible. The name 'winfo_parent' is simple rendered in fixed-pitch type, like the other anotated words, but with no link. The annotation should just be removed or replace with something only meant to change the font, without linking anywhere.

Suggested change
*container*/*child widget* reflects the geometry management structure.
*master*/*child widget* reflects the container structure.

Leave the word 'master' alone here. This paragraph does not clarify much, and is misleading; changing 'container' to 'geometry manager' makes it worse. A non-root's master is specified when it is created, in the class call, before any geometry management. So 'parent' is a proper conceptual synonym. The default container for a widget is its master, but it can be placed in any container, and, I believe, more than one. (Just as a object can be in more than one collection.) But fixing the paragraph is beyond the scope of this issue/PR. As i will explain on the issue, 'slave' is specific to geometry, so even replacing that with 'widget' makes the last sentence less true.


.. attribute:: children

Expand Down Expand Up @@ -644,8 +644,8 @@
relationship specification - *above*, *to the left of*, *filling*, etc - and
works everything out to determine the exact placement coordinates for you.

The size of any *master* widget is determined by the size of the "slave widgets"
inside. The packer is used to control where slave widgets appear inside the
The size of any *parent* widget is determined by the size of the "child widgets"
inside. The packer is used to control where child widgets appear inside the
master into which they are packed. You can pack widgets into frames, and frames
into other frames, in order to achieve the kind of layout you desire.
Additionally, the arrangement is dynamically adjusted to accommodate incremental
Expand Down Expand Up @@ -673,7 +673,7 @@
see the man pages and page 183 of John Ousterhout's book.

anchor
Anchor type. Denotes where the packer is to place each slave in its parcel.
Anchor type. Denotes where the packer is to place each child widget in its parcel.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Anchor type. Denotes where the packer is to place each child widget in its parcel.
Anchor type. Denotes where the packer is to place each child in its parcel.


expand
Boolean, ``0`` or ``1``.
Expand All @@ -682,10 +682,10 @@
Legal values: ``'x'``, ``'y'``, ``'both'``, ``'none'``.

ipadx and ipady
A distance - designating internal padding on each side of the slave widget.
A distance - designating internal padding on each side of the child widget.

padx and pady
A distance - designating external padding on each side of the slave widget.
A distance - designating external padding on each side of the child widget.

side
Legal values are: ``'left'``, ``'right'``, ``'top'``, ``'bottom'``.
Expand Down
Loading