Type Method

popUpContextMenu:withEvent:forView:withFont:

Displays a contextual menu over a view for an event using a specified font.

Declaration

+ (void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view withFont:(NSFont *)font;

Parameters

menu

The menu object to use for the contextual menu.

event

An NSEvent object representing the event.

view

The view object over which to display the contextual menu.

font

An NSFont object representing the font for the contextual menu. If you pass in nil for the font, the method uses the default font for menu.

Discussion

Specifying a font using the font parameter is discouraged. Instead, set the menu’s font using the font property, then pass nil for the font parameter.

See Also

Displaying Context-Sensitive Help

+ popUpContextMenu:withEvent:forView:

Displays a contextual menu over a view for an event.

- helpRequested:

Overridden by subclasses to implement specialized context-sensitive help behavior.

Deprecated
- popUpMenuPositioningItem:atLocation:inView:

Pops up the menu at the specified location.