Platforms to show: All Mac Windows Linux Cross-Platform

NSMenuMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Menus MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A class to represent a menu in the Cocoa world.

All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the message, name and reason properties you can see what was the reason for this exception. Please report if you find a method which does not handle exceptions correct.

Presentation Styles

Constant Value Description
PresentationStylePalette 1 The menu marked as palette is to be displayed in place of the menu item presenting it, with its items aligned horizontally.
PresentationStyleRegular 0 The default presentation style. Typically means the menu will be presented as either a popup or pulldown menu, based on the context.

Selection Modes

Constant Value Description
SelectionModeAutomatic 0 The menu will determine the appropriate selection mode based on the context and its contents.
SelectionModeSelectAny 2 The user can select multiple items in the menu. A change in selection will not automatically deselect any previously selected item in the same selection group.
SelectionModeSelectOne 1 The user will be allowed to select at most one menu item in the same selection group at a time. A change in selection will deselect any previously selected item.

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some events using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes

The items on this page are in the following plugins: MBS MacBase Plugin.

NSMenuItemMBS   -   NSMetadataItemMBS

The biggest plugin in space...