How to do it...
Here, we will create a top-level frame that will contain other frames and widgets. This will help us get our GUI layout just the way we want.
In order to do so, we will have to embed our current controls within a central frame called ttk.LabelFrame. This frame ttk.LabelFrame is the child of the main parent window and all controls will be the children of this ttk.LabelFrame.
Up to this point in our recipes, we had assigned all widgets to our main GUI frame directly. Now, we will only assign LabelFrame to our main window and after that, we will make this LabelFrame the parent container for all the widgets.
This creates the following hierarchy in our GUI layout:
In the preceding diagram, win is the variable that holds a reference ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access