Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSMenuMBS class.

NSMenuMBS.allowsContextMenuPlugIns as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the popup menu allows appending of contextual menu plugin items.

Value is true if the popup menu allows appending of contextual menu plugin items, otherwise false.
Available in Mac OS X v10.6 and later.

Can be used to hide services menu items.
(Read and Write property)

Some examples using this property:

NSMenuMBS.autoenablesItems as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether menu items are automatically enabled and disabled.

Mac OS X 10.5 only.
(Read and Write property)

NSMenuMBS.Font as NSFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The font used to display the menu and its submenus.

This font will be used to display the menu and any submenus that have not had their font set explicitly.
Available in Mac OS X v10.6 and later.
(Read and Write property)

NSMenuMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The internal reference to the NSMenu object.

(Read and Write property)

NSMenuMBS.highlightedItem as NSMenuItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the highlighted item in the receiver.

Returns the highlighted item in the receiver, or nil if no item in the menu is highlighted.
Available in Mac OS X v10.5 and later.
(Read only property)

NSMenuMBS.Identifier as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A string that identifies this user interface item.

It should be set to a unique value on NSViews when they are intended to be used inside a view-based NSTableView. Identifiers should be unique per-window. For programmatically created user interface items, you would typically set this value in code after creating a view but before adding it to a window. You may also want to set an identifier on a window, after creating it programmatically, to identify the window easily when it is reopened. You should not change the identifier after a view is added to a window. Identifiers beginning with an underscore are reserved for the system. In framework classes that implement this protocol, the accessor methods are not intended to be overridden.

To help avoid collision of identifiers, it is recommended that identifiers use the same prefix as is used for the framework or application. For example, identifiers for standard AppKit interface items, such as the open panel, will begin with "NS".

The slash '/', backslash '\', and colon ':' characters are reserved and should not be used in identifiers.
(Read and Write property)

NSMenuMBS.menuBarHeight as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the menu bar height for the current application's main menu.

Returns the receiver's main menu bar height or 0.0 if the receiver is some other menu.
This method supersedes the menuBarHeight class method of the NSMenuView class.
Available in Mac OS X v10.4 and later.
(Read only property)

NSMenuMBS.minimumWidth as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The minimum width of the menu.

The menu will not draw smaller than its minimum width, but may draw larger if it needs more space. The default value is 0.
Available in Mac OS X v10.6 and later.
(Read and Write property)

NSMenuMBS.numberOfItems as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The number of menu items in this menu.

(Read only property)

NSMenuMBS.presentationStyle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 23.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The presentation style of the menu.

This property is not respected if the menu is the main menu of the app.

Requires macOS Sonoma or newer.
(Read and Write property)

NSMenuMBS.selectionMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 23.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The selection mode of the menu.

Note the selection mode only has effect on menu items that belong to the same selection group. A selection group consists of the items with the same target/action.

Requires macOS Sonoma or newer.
(Read and Write property)

NSMenuMBS.showsStateColumn as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a Boolean value that indicates whether the receiver displays the state column.

Available in Mac OS X v10.5 and later.
Returns true if the receiver displays the state column, otherwise false.

The state column is the area in the menu items, where state of menuitems are shown like a checkmark.
(Read and Write property)

NSMenuMBS.size as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the size of the menu.

Returns the size of the menu in screen coordinates.
The menu may draw at a smaller size when shown, depending on its positioning and display configuration.
Available in Mac OS X v10.6 and later.
(Read only property)

NSMenuMBS.supermenu as NSMenuMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The parent menu of this menu.

(Read only property)

NSMenuMBS.Title as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 7.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The title of the menu.

(Read and Write property)

NSMenuMBS.userInterfaceLayoutDirection as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Menus MBS MacBase Plugin 16.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Configures the layout direction of menu items in the menu.

This property configures the layout direction (a value of type NSUserInterfaceLayoutDirection) of menu items in the menu. If no layout direction is explicitly set for a menu, then the menu defaults to the layout direction specified for the application object. See userInterfaceLayoutDirection in NSApplication Class Reference.

NSUserInterfaceLayoutDirectionLeftToRight = 0
NSUserInterfaceLayoutDirectionRightToLeft = 1

Available in OS X v10.11 and later.
(Read and Write property)

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


The biggest plugin in space...