Skip to content

docs: Add note recommending grid over pack in tkinter documentation#144839

Open
zlq500 wants to merge 1 commit intopython:mainfrom
zlq500:tkinter-docs-fix
Open

docs: Add note recommending grid over pack in tkinter documentation#144839
zlq500 wants to merge 1 commit intopython:mainfrom
zlq500:tkinter-docs-fix

Conversation

@zlq500
Copy link

@zlq500 zlq500 commented Feb 15, 2026

Summary

This PR adds a note at the beginning of the 'The Packer' section in the tkinter documentation to recommend using grid geometry manager over pack for new code.

Background

As noted in TkDocs, while pack is equally powerful, grid is easier to use and makes it less onerous to create layouts that look appealing. The widespread use of pack in older code is a leading reason that many Tk user interfaces look terrible.

Changes

  • Added a .. note:: directive at the beginning of 'The Packer' section
  • The note recommends using grid for new code
  • Maintains backward compatibility by keeping the existing pack documentation

Issue

Fixes #93501


📚 Documentation preview 📚: https://cpython-previews--144839.org.readthedocs.build/

Add a note at the beginning of 'The Packer' section to recommend using
grid geometry manager over pack for new code, as grid is easier to use
and helps create more appealing layouts.

Fixes python#93501
@python-cla-bot
Copy link

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Tkinter recommends grid over pack

1 participant