DesktopApplicationMenuItem

From Xojo Documentation

Revision as of 20:15, 23 July 2021 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Class (inherits from DesktopMenuItem)


New in 2021r3

Used to place menu items in the Application menu on macOS. A menu item subclassed from DesktopApplicationMenuItem is automatically moved to the Application menu for macOS builds. On all other target platforms, the menu item appears where you put it in the Menu Editor. You cannot place menu items directly in the Apple or application menus in the Menu Editor.

Events
MenuBarSelected MenuItemSelected
Properties
AutoEnabled HasSecondaryModifierKey fa-lock-32.png Shortcut
Enabled HasStandardModifierKey fa-lock-32.png ShortcutKey fa-lock-32.png
HasAltKey fa-lock-32.png Icon Tag
HasCheckmark Index fa-lock-32.png Text
HasMacControlKey fa-lock-32.png LastRowIndex fa-lock-32.png Visible
HasMacOptionKey fa-lock-32.png Name
Methods
AddMenu Close Popup
AddMenuAt Count RemoveMenuAt
Child Handle
Clone MenuAt

Notes

To use DesktopApplicationMenuItem, create the menu item under the menu that you want to use for the Windows and Linux builds of the application and then use the Inspector to change its super class to DesktopApplicationMenuItem. Otherwise, set up the menu item normally.

See Also

DesktopMenuItem, DesktopPreferencesMenuItem, DesktopQuitMenuItem classes.