简体   繁体   English

等效于wxPython中Tkinter的位置几何管理器

[英]Equivalent to Tkinter's place geometry manager in wxPython

Is there an equivalent to Tkinter's place geometry manager in wxPython? 在wxPython中是否有与Tkinter的位置几何管理器等效的工具?

For those those that don't know, place allows the positioning of widgets based on xy or relative xy coordinates. 对于那些不知道的对象,place允许基于xy或相对xy坐标定位小部件。

I'm a fan of this geometry manager simply because it offers a lot of control over widget positioning. 我之所以喜欢此几何图形管理器,是因为它提供了对小部件定位的大量控制。

I think the best answer is "no, there is no equivalent". 我认为最好的答案是“不,没有对等的东西”。 You can use absolute positioning with the "pos" keyword argument in the constructor, but that doesn't come close to the power of place . 您可以在构造函数中使用带有“ pos”关键字参数的绝对定位,但这与place作用并不接近。

The GridBagSizer or FlexGridSizer are kind of like Tkinter's place. GridBagSizer或FlexGridSizer有点像Tkinter的地方。 Of course, wx also supports absolute positions, although I do not recommend that. 当然,wx也支持绝对位置,尽管我不建议这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM