Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSMenuItemMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 20.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Call this method once to have a menuitem which has no action.
NSMenuItemMBS.Constructor(DesktopMenuitem as DesktopMenuitem)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 22.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
May raise UnsupportedOperationException or NilObjectException if used incorrectly.
See also:
NSMenuItemMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Useful if you get a NSMenuItem reference from a declare.
The object is retained.
See also:
NSMenuItemMBS.Constructor(MenuItem as MenuItem)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 18.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
May raise UnsupportedOperationException or NilObjectException if used incorrectly.
See also:
NSMenuItemMBS.Constructor(Other as NSMenuItemMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 22.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
See also:
NSMenuItemMBS.Constructor(title as string="", keyEquivalent as string="")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Handle is not 0 after this call if it was successfull.
name and charcode are optional and can be "".
Charcode is the initial keyEquivalent for this menu item.
You can set the KeyEquivalentModifierMask to get different modifier keys.
See also:
NSMenuItemMBS.CreateMenuItem(title as string="", keyEquivalent as string="")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 7.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Handle is not 0 after this call if it was successfull.
name and charcode are optional and can be "".
Charcode is the initial keyEquivalent for this menu item.
You can set the KeyEquivalentModifierMask to get different modifier keys.
Deprecated, please use the Constructor instead.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 7.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSMenuItemMBS.setAction(target as NSResponderMBS, selectorName as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 23.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Please make sure the selector is correct as otherwise you get an exception later.
And make sure the target object stays alive.
NSMenuItemMBS.setTitleWithMnemonic(title as String)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Menus | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Use an ampersand character to mark the character (the one following the ampersand) to be designated.
Deprecated by Apple.
The items on this page are in the following plugins: MBS MacBase Plugin.