Skip to content

Tkinter recommends grid over pack #93501

@Ryuno-Ki

Description

@Ryuno-Ki

Documentation
I'm using Python 3.9 and building some GUI for a hobby project of mine on NixOS/Linux.

The Python documentation on tkinter explains the packer.

However, going through TkDocs Tutorial on geometry concept there is an upgrade box saying:

We'll go into more detail in a later chapter, but grid was introduced several years after Tk became popular. Before that, an older geometry manager named pack was most commonly used. It's equally powerful but much harder to use, making it onerous to create layouts that look appealing today. Unfortunately, much of the example Tk code and documentation out there uses pack instead of grid (a good clue to how current it is). The widespread use of pack is a leading reason that so many Tk user interfaces look terrible. Start new code with grid, and upgrade old code when you can.

In order to not shy away people, it might make sense to update the documentation code to use the newer grid geometry manager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions