From the course: Python GUI Development with Tkinter

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using the Pack geometry manager

Using the Pack geometry manager

From the course: Python GUI Development with Tkinter

Start my 1-month free trial

Using the Pack geometry manager

- [Instructor] There are three types of geometry managers in Tk, pack, grid, and place. Of the three Tk geometry managers, the pack manager is the simplest to use. When you use the pack manager to display widgets and their parent frame or window the pack manager algorithm will place those child widgets against an inner edge of the parent or against other widgets that are already packed against that edge. After all of the child widgets are packed into place, the geometry manager calculates the size of the bounding box necessary to hold them and stretches the parent widget to fit around its children. The benefit of using the pack geometry manager is that it is simple to use and only has a few options and it's well-suited for a few specific scenarios. If you want to have a widget be expanded to fill its entire parent or frame, if you want to stack multiple widgets vertically on top of each other, or if you want to place multiple widgets side-by-side, basically stacking them horizontally.…

Contents