简体   繁体   中英

Remove Preferences menu item on OS X apps

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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