From the course: Python GUI Development with Tkinter
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Laying out of the widgets
From the course: Python GUI Development with Tkinter
Laying out of the widgets
- [Instructor] I've created the widgets. Now it's time to place them on the window using the Geometry Manager. And to figure out where to put them, let's refer back to our planning diagram. I'm going to begin by organizing the two frames which are both children of the master window. Since the two frames stack on top of each other, the easiest geometry manager to use here would be the Pack Manager. We'll continue editing the code from the point we left off at the end of the last video. The place the header and content frame into my window using the Pack Manager, I'll call self.frame_header and then .pack, and I'll do the same down here for the content frame, self.frame_content.pack. And by calling the pack method without any parameters, it'll place those frames against the top of the window and will pack them into order in which I call the pack method. So it'll pack the header frame at the top and then the content frame just below it. It's important to note that it did not just add the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.