开发者

TKinter: how to change Frame width dynamically

how can I set w开发者_JS百科idth to a tk.Frame (post-initialization ?)

In other words, is there a member function to do it ? Sometheing like frame.setWidth()

thanks


frame.config(width=100)

Be aware that if there are children in the frame that are managed by grid or pack, your changes may have no effect. There are solutions to this, but it is rarely needed. Generally speaking you should let widgets be their natural size. If you do need to resize a frame that is a container of other widgets you need to turn "geometry propagation" off.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜