Skip to content

Commit a172023

Browse files
gh-153550: Note grid/pack incompatibility and toplevels in geometry docs
Address review comments: forward-reference the grid/pack warning from the geometry managers intro, and mention that frames and toplevels are containers too (toplevels being managed by the window manager). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 94ac6b6 commit a172023

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Doc/library/tkinter.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,9 @@ Forgetting to call a geometry manager is a common early mistake:
604604
the widget is created, but nothing shows up.
605605

606606
Tk provides three geometry managers.
607-
Each is inherited by every widget, so any widget can be managed by any of them;
608-
the choice depends on the kind of layout you want.
607+
Each is inherited by every widget, so any widget can be managed by any of them
608+
(but see the warning below about the incompatibility of grid and pack).
609+
The choice depends on the kind of layout you want.
609610

610611
:meth:`grid <Grid.grid_configure>`
611612
Arranges widgets in a two-dimensional table of rows and columns.
@@ -646,7 +647,8 @@ the choice depends on the kind of layout you want.
646647
badge.place(relx=1.0, rely=0.0, anchor="ne")
647648

648649
Layouts are built up by nesting:
649-
grid or pack widgets inside a frame, and frames inside other frames.
650+
grid or pack widgets, including frames, inside a frame or toplevel.
651+
Toplevels are managed by the OS window manager.
650652
Classic and themed :mod:`tkinter.ttk` widgets can be managed interchangeably.
651653

652654
.. warning::

0 commit comments

Comments
 (0)