简体   繁体   English

使用wxPython是否可以将菜单与菜单栏的右边对齐?

[英]Is it possible to align a menu to the right of the menu bar using wxPython?

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. 我正在尝试在wxPython 2.8.11.0和Python 2.7中创建一个菜单栏,其中大多数菜单都保持左对齐(正常情况下),但是一个菜单-理想情况下-右对齐,或者至少以某种方式与其余菜单分开。

Is this possible? 这可能吗?

EDIT: This needs to be a cross-platform solution. 编辑:这需要是一个跨平台的解决方案。

If the native menubar doesn't support it, then wxPython probably won't either. 如果本机菜单栏不支持它,则wxPython可能也不支持。 There is a pure Python implementation of the menubar though. 菜单栏有一个纯Python实现。 It's called FlatMenu. 它称为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. 如果它不起作用,至少您可以用Python代码对其进行破解或提交补丁,而不必试图找出用于修复wxWidgets的C ++。

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

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