![]() |
VOOZH | about |
The Pack geometry manager packs widgets relative to the earlier widget. Tkinter literally packs all the widgets one after the other in a window. We can use options like fill, expand, and side to control this geometry manager.
Compared to the grid manager, the pack manager is somewhat limited, but itβs much easier to use in a few, but quite common situations:
Code #1: Putting a widget inside frame and filling entire frame. We can do this with the help of expand and fill options.
Output:
Code #2: Placing widgets on top of each other and side by side. We can do this by side option.
Output:
Code #3: