[英]Equivalent for SWT's .pack() in wxPython?
Unless you set the size of the widget explicitly, they generally already adjust to the right size. 除非您明确设置小部件的大小,否则它们通常已经调整为正确的大小。 If you add widgets to a sizer and tell them to stretch, then that won't be the case, of course.
如果将窗口小部件添加到大小调整程序中并告诉它们进行拉伸,那么事实并非如此。 You can also use the sizer's Fit() method to force it too, although I rarely think this is necessary.
您也可以使用sizer的Fit()方法来强制执行此操作,尽管我很少认为这是必需的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.