MonobjcMonobjc Documented Class Library
TextViewMenuForEventAtIndex Method (view, menu, event, charIndex)
NamespacesMonobjc.AppKitINSTextViewDelegateTextViewMenuForEventAtIndex(NSTextView, NSMenu, NSEvent, NSUInteger)

Allows delegate to control the context menu returned by the text view.

Original signature is '- (NSMenu *)textView:(NSTextView *)view menu:(NSMenu *)menu forEvent:(NSEvent *)event atIndex:(NSUInteger)charIndex'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
NSMenu TextViewMenuForEventAtIndex(
	NSTextView view,
	NSMenu menu,
	NSEvent event,
	NSUInteger charIndex
Function TextViewMenuForEventAtIndex ( _
	view As NSTextView, _
	menu As NSMenu, _
	event As NSEvent, _
	charIndex As NSUInteger _
) As NSMenu
NSMenu^ TextViewMenuForEventAtIndex(
	NSTextView^ view, 
	NSMenu^ menu, 
	NSEvent^ event, 
	NSUInteger charIndex
view (NSTextView)
The text view sending the message.
menu (NSMenu)
The proposed contextual menu.
event (NSEvent)
The mouse-down event that initiated the contextual menu’s display.
charIndex (NSUInteger)
The character position where the mouse button was clicked.
Return Value
A menu to use as the contextual menu. You can return menu unaltered, or you can return a customized menu.
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)