May 2017
Beginner to intermediate
444 pages
11h 31m
English
In tkinter, adding space horizontally and vertically is done by using built-in properties named padx and pady. These can be used to add space around many widgets, improving horizontal and vertical alignments, respectively. We hardcoded 20 pixels of space to the left and right of LabelFrame, and we added 40 pixels to the top and bottom of the frame. Now our LabelFrame stands out better than it did before.
We can use a loop to add space around the labels contained within LabelFrame:
GUI_add_padding_loop.py

Now, the labels within the LabelFrame widget have some space around ...
Read now
Unlock full access