You have widgets nested inside widgets. Even if you have a laptop that needs to expand correctly in the container, you also need to make sure that each container upwards also expands correctly. You have not done so. For example, ask yourself if the canvas was set up for proper growth inside lower .
As you get started, here's what I recommend. Instead of trying to get everything at once, choose the divide and conquer approach. First, create a framework for the main areas of your GUI. Do nothing but these frames, and get them resized to be exactly what you want. This helps at this stage to give everyone their own color so that you can clearly see where the widgets are. You can always change the color later. Also, if you have only two widgets or all of your widgets are oriented horizontally or vertically, a package is often easier to use than a grid.
For instance:
upper.pack(side="top", fill="x", expand=False) lower.pack(side="bottom", fill="both", expand=True)
After you have these main parts, the size of which will be resized accordingly, you need to solve the problem for only one of these areas. Select an area and do the same: add to your child widgets or split into frames if you have areas inside the area. After you do this, rinse, rinse, repeat.
source share