MonobjcMonobjc Documented Class Library
InsertItemWithTitleActionKeyEquivalentAtIndex Method (aString, aSelector, keyEquiv, index)
NamespacesMonobjc.AppKitNSMenuInsertItemWithTitleActionKeyEquivalentAtIndex(NSString, IntPtr, NSString, NSInteger)

Creates and adds a menu item at a specified location in the receiver.

Original signature is '- (NSMenuItem *)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector keyEquivalent:(NSString *)keyEquiv atIndex:(NSInteger)index'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSMenuItem InsertItemWithTitleActionKeyEquivalentAtIndex(
	NSString aString,
	IntPtr aSelector,
	NSString keyEquiv,
	NSInteger index
)
Public Overridable Function InsertItemWithTitleActionKeyEquivalentAtIndex ( _
	aString As NSString, _
	aSelector As IntPtr, _
	keyEquiv As NSString, _
	index As NSInteger _
) As NSMenuItem
public:
virtual NSMenuItem^ InsertItemWithTitleActionKeyEquivalentAtIndex(
	NSString^ aString, 
	IntPtr aSelector, 
	NSString^ keyEquiv, 
	NSInteger index
)
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.
index (NSInteger)
An integer index identifying the location of the menu item in the menu.
Return Value
The new menu item (an object conforming to the NSMenuItem protocol) or nil if the item could not 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)