Tkinter both 'sticky' and 'rowconfigure' did not fill the empty space Tkinter both 'sticky' and 'rowconfigure' did not fill the empty space tkinter tkinter

Tkinter both 'sticky' and 'rowconfigure' did not fill the empty space


The reason for the gap is because you don't have the header frame stick to the bottom of the space it was given. If you change the sticky attribute for the header to be "nsew" you'll see that the header fills the extra space.

self.header_frame.grid(row=0, column=0,sticky="nesw")

I'm guessing you don't want the header frame to be so tall. If that is the case, give row 0 a weight of 0 instead of 1. That way all extra unallocated space will be given to row 1.

self.root.grid_rowconfigure(0,weight=0)

After doing so, and after adding a couple of other widgets to simulate your screen, this is what it looks like:

Screenshot