开发者

Remove Preferences menu item on OS X apps

开发者 https://www.devze.com 2023-03-10 19:18 出处:网络
When using wxPython, is it possible to remove or disable the \"开发者_运维问答Preferences\" menu item that gets automatically created in the Python menu on OS X? For the benefit of others that may run

When using wxPython, is it possible to remove or disable the "开发者_运维问答Preferences" menu item that gets automatically created in the Python menu on OS X?


For the benefit of others that may run into this, I figured out the solution: "wx.App_SetMacPreferencesMenuItemId(wx.ID_NONE)". The trick is to do this before you create the menu, not after. On wxPython 2.9.1.1 it will ghost out the Preferences menu item (which is good enough for me). On 2.9.2 it will remove the item completely.

0

精彩评论

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