MonobjcMonobjc Documented Class Library
AddItemWithTitleActionKeyEquivalent Method (aString, aSelector, keyEquiv)
NamespacesMonobjc.AppKitNSMenuAddItemWithTitleActionKeyEquivalent(NSString, IntPtr, NSString)

Creates a new menu item and adds it to the end of the receiver.

Original signature is '- (NSMenuItem *)addItemWithTitle:(NSString *)aString action:(SEL)aSelector keyEquivalent:(NSString *)keyEquiv'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSMenuItem AddItemWithTitleActionKeyEquivalent(
	NSString aString,
	IntPtr aSelector,
	NSString keyEquiv
)
Public Overridable Function AddItemWithTitleActionKeyEquivalent ( _
	aString As NSString, _
	aSelector As IntPtr, _
	keyEquiv As NSString _
) As NSMenuItem
public:
virtual NSMenuItem^ AddItemWithTitleActionKeyEquivalent(
	NSString^ aString, 
	IntPtr aSelector, 
	NSString^ keyEquiv
)
Parameters
aString (NSString)
A string to be made the title of the menu item.
aSelector (IntPtr)
The action-message selector to assign to the menu item.
keyEquiv (NSString)
A string identifying the key to use as a key equivalent for the menu item. If you do not want the menu item to have a key equivalent, keyEquiv should be an empty string (@"") and not nil.
Return Value
The created menu item (an object conforming to the NSMenuItem protocol) or nil if the object couldn't be created.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)