是否可以使用 wxPython 将菜单与菜单栏右侧对齐?
我正在尝试在 wxPython 2.8.11.0 和 Python 2.7 中创建一个菜单栏,其中大多数菜单都是左对齐的(正常情况下),但理想情况下,有一个菜单栏是右对齐的,或者至少以某种方式与其余菜单分开。
这可能吗?
编辑:这需要是一个跨平台的解决方案。
I'm trying to create a menu bar in wxPython 2.8.11.0 and Python 2.7 where most of the menus are left aligned (as normal) but one is - ideally - right aligned, or at least separated in some way from the rest.
Is this possible?
EDIT: This needs to be a cross-platform solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果本机菜单栏不支持它,那么 wxPython 可能也不支持。不过,菜单栏有一个纯 Python 实现。它被称为平面菜单。我会尝试一下。如果它不起作用,至少你可以破解它或提交 Python 代码补丁,而不是试图找出 C++ 来修复 wxWidgets。
If the native menubar doesn't support it, then wxPython probably won't either. There is a pure Python implementation of the menubar though. It's called FlatMenu. I would try that. If it doesn't work, at least you can hack it or submit a patch in Python code rather than trying to figure out the C++ for fixing wxWidgets.