Python Tkinter - Grid Geometry Management Part 2 - sticky, columnspan, rowspan

preview_player
Показать описание
This video continues the explanation of Python Tkinter's Grid Geometry Management by going more in depth in behavioural elements related to our widgets like the sticky feature and the space a widget can take with columnspan and rowspan.

STICKY
The sticky argument in the grid method will simply make your widget stick to one of the four sides of the area created with each row and column. Instead of a widget being placed in the middle with a specific size, the sticky argument will set it up so that we are either at:
N - Top
S - Bottom
W - Left
E - Right

This will take in place even though the rows and columns change size and even overrides the size that one assigns to the widget.

COLUMNSPAN and ROWSPAN
It is very possible that on your GUI you wish to have a widget that takes a lot more spice vertically (rowspan) or horizontally (columnspan). Basically, these two features of grid will allow your widget to extend to another column/row without influencing the size of its original location. This can be hard to be shown through writing but the video shows a clear behavioural example of a GUI when using this argument on a widget.
Рекомендации по теме
Комментарии
Автор

I was too lazy to read long arcticles about those to get why am I having issues, those vids are great easy and quick explanations, thanks!

almostabsent
Автор

Thanks, that's exactly what I was looking for

Raphael-bqfc
Автор

if I want to create a gui that when I maximize the window will be compatible for all resolutions and screens?

mrpacman
Автор

Hey Thinking Through code if you're using sticky to you have to specify width and height?

doneros
Автор

Great video on the grid, but made overly complicated by the use of ttk. The tutorial would be better for newcomers to tkinter if you used only tk widgets.

gedtoon