Python Tkinter TTK Separator With Label Python Tkinter TTK Separator With Label tkinter tkinter

Python Tkinter TTK Separator With Label


The only problem with your code is that you haven't called grid_columnconfigure to tell tkinter what to do with extra space. Since you didn't tell the inner frame what to do with extra space, it left it blank. When the widget is placed in its parent and expands, your inner widgets weren't using the extra space.

Add the following in your __init__:

self.grid_columnconfigure(0, weight=1)

As a general rule of thumb, you always want to set the weight of at least one row and one column in a parent that uses grid to manage it's children.