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 Grid geometry manager

Using the Grid geometry manager

From the course: Python GUI Development with Tkinter

Start my 1-month free trial

Using the Grid geometry manager

- [Instructor] The Pack geometry manager proved to be useful for simple arrangements where widgets are stacked on each other vertically or horizontally. If we want to create something more complicated than that, then the Pack manager becomes very tedious to work with. For organizing widgets in two dimensions, the Grid geometry manager is a better choice. It divides the area of the parent widget into an imaginary grid and puts widgets into grid cells indexed by their row and column numbers. The Grid geometry manager makes it easy to organize widgets relative to each other in both the horizontal and vertical direction. This style of organization is common to modern GUIs, so the Grid manager is my typical go-to geometry manager. Really, the only downside of using the Grid manager is that it's slightly more involved than using the Pack manager and it requires you to plan out the organization of your GUI before you begin coding. I'll begin by going to my exercise files in the chapter six…

Contents