Python Tkinter TTK Separator With Label

元气小坏坏 提交于 2019-12-01 18:12:51

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!