I am new to tkinter and I'm trying to make a few windows using the grid() method.
However, I'm always struggling to understand which cell will show above the other when resizing the window to a very small one. Sometimes the last-added one will be on top, sometimes not (my last example is a separator going on top of a frame containing labels even though I declared the separator first).
Could anyone explain to me how these 'levels' work? and how I can set which one should 'disappear' behind the other in case the user decides to resize the window to make it small?
Thanks in advance!
grid()
method, the stacking order is still determined by the order in which they are added, but it's also influenced by the row and column indices specified in the grid layout.lift()
and lower()
methods of the widget. These methods allow you to raise a widget to the top of the stacking order (lift()) or lower it to the bottom (lower()).