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 |
Notes: 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.
- 4 events
- event DidClose
- event EnableMenuItems
- event willHighlightItem(item as NSMenuItemMBS)
- event WillOpen
- 13 properties
- property allowsContextMenuPlugIns as boolean
- property autoenablesItems as Boolean
- property Font as NSFontMBS
- property Handle as Integer
- property highlightedItem as NSMenuItemMBS
- property menuBarHeight as Double
- property minimumWidth as Double
- property numberOfItems as Integer
- property showsStateColumn as boolean
- property size as NSSizeMBS
- property supermenu as NSMenuMBS
- property Title as String
- property userInterfaceLayoutDirection as Integer
- 20 methods
- method addItem(m as NSMenuItemMBS)
- method cancelTracking
- method cancelTrackingWithoutAnimation
- method CarbonMenuRef as Integer
- method Constructor(Handle as Integer)
- method Constructor(title as string="")
- method indexOfItem(item as NSMenuItemMBS) as Integer
- method indexOfItemWithSelector(selector as string) as Integer
- method indexOfItemWithSubmenu(item as NSMenuMBS) as Integer
- method indexOfItemWithTag(tag as Integer) as Integer
- method indexOfItemWithTitle(title as string) as Integer
- method insertItem(m as NSMenuItemMBS, index as Integer)
- method Item(index as Integer) as NSMenuItemMBS
- method itemWithSelector(selector as string) as NSMenuItemMBS
- method performActionForItemAtIndex(index as Integer)
- method popUpMenuPositioningItem(item as NSMenuItemMBS, location as NSPointMBS, view as NSViewMBS = nil) as boolean
- method removeAllItems
- method removeItem(m as NSMenuItemMBS)
- method removeItemAtIndex(index as Integer)
- method update
- 13 shared methods
- shared method helpMenu as NSMenuMBS
- shared method mainMenu as NSMenuMBS
- shared method menuBarVisible as boolean
- shared method NSMenuDidAddItemNotification as string
- shared method NSMenuDidBeginTrackingNotification as string
- shared method NSMenuDidChangeItemNotification as string
- shared method NSMenuDidEndTrackingNotification as string
- shared method NSMenuDidRemoveItemNotification as string
- shared method NSMenuDidSendActionNotification as string
- shared method NSMenuWillSendActionNotification as string
- shared method popUpContextMenu(menu as NSMenuMBS, theEvent as NSEventMBS, view as NSViewMBS, font as NSFontMBS = nil)
- shared method setMenuBarVisible(value as boolean)
- shared method windowsMenu as NSMenuMBS
This class has no sub classes.
Some methods using this class:
- ContinuityCameraMBS.PopupMenu as NSMenuMBS
- NSCellMBS.defaultMenu as NSMenuMBS
- NSSpellCheckerMBS.menuForResult(TextCheckingResult as NSTextCheckingResultMBS, checkedString as string, options as Dictionary = nil, atLocation as NSPointMBS, view as NSViewMBS) as NSMenuMBS
- NSStatusItemMBS.popUpStatusItemMenu(menu as NSMenuMBS)
Some properties using for this class:
- NSApplicationMBS.helpMenu as NSMenuMBS
- NSApplicationMBS.mainMenu as NSMenuMBS
- NSApplicationMBS.windowsMenu as NSMenuMBS
- NSMenuItemMBS.submenu as NSMenuMBS
- NSMenuMBS.supermenu as NSMenuMBS
- NSPopUpButtonCellMBS.menu as NSMenuMBS
- NSPopUpButtonMBS.menu as NSMenuMBS
- NSStatusItemMBS.Menu as NSMenuMBS
- NSSearchFieldMBS.searchMenuTemplate as NSMenuMBS
- NSSegmentedControlMBS.menuForSegment(segment as Integer) as NSMenuMBS
Some events using this class:
- CustomNSTextFieldMBS.menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS
- CustomNSTextViewMBS.menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS
- CustomNSTokenFieldMBS.menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS
- DesktopNSTokenFieldControlMBS.menuForRepresentedObject(representedObject as Variant) as NSMenuMBS
- DesktopWKWebViewControlMBS.didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- DesktopWKWebViewControlMBS.willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- NSApplicationDelegateMBS.applicationDockMenu as NSMenuMBS
- NSTokenFieldMBS.menuForRepresentedObject(representedObject as Variant) as NSMenuMBS
- WKWebViewControlMBS.didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- WKWebViewControlMBS.willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
Some examples using this class:
- /MacCocoa/Font PopupMenu in Cocoa
- /MacCocoa/NSSearchField control with menu
- /MacCocoa/NSStatusItem/Name in menu bar
- /MacCocoa/NSStatusItem/StatusItem
- /MacCocoa/NSStatusItem/StatusItem easy
- /MacCocoa/NSStatusItem/StatusItem with Image in menu
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/Search Field/CustomSearchField with menu
- /MacFrameworks/CustomNSTextFieldMBS test
- /MacFrameworks/TokenField
Blog Entries
- MBS Xojo / Real Studio Plugins, version 15.5pr1
- MBS Xojo / Real Studio Plugins, version 15.2pr1
- Apply fonts to font PopupMenu
- MBS Xojo / Real Studio Plugins, version 14.3pr1
- MBS Xojo / Real Studio Plugins, version 14.0pr2
- MBS Real Studio Plugins, version 13.1pr13
- MBS Real Studio Plugins, version 12.3pr11
- MBS Real Studio Plugins, version 11.2pr5
Xojo Developer Magazine
The items on this page are in the following plugins: MBS MacBase Plugin.
NSMenuItemMBS - NSMetadataItemMBS
