Re: Contextual Menu doesn't respond to control+click
Re: Contextual Menu doesn't respond to control+click
- Subject: Re: Contextual Menu doesn't respond to control+click
- From: "Nick Kreeger" <email@hidden>
- Date: Mon, 28 Aug 2006 13:41:53 -0500
Since you are building your menu in |rightMouseDown:|, you will need to do
the same with |keyDown:| to trap a control-click.
Read here for more information:
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/chapter_6_section_3.html
- Nick
On 8/24/06, Brian Amerige <email@hidden> wrote:
Hi all,
I've got a contextual menu which works perfectly in my NSTableView,
with the exception of the fact that it doesn't respond to control
+clicks, but works fine with right clicks. I've got the following in
my NSTableView subclass:
- (void)rightMouseDown:(NSEvent *)theEvent
{
NSPoint p = [super convertPoint:[theEvent locationInWindow]
fromView:nil];
int i = [super rowAtPoint:p];
if (i < [super numberOfRows])
[super selectRowIndexes:[NSIndexSet indexSetWithIndex:i]
byExtendingSelection:NO];
[NSMenu popUpContextMenu:[super menu] withEvent:theEvent
forView:self];
}
Thanks in advance!
Brian Amerige.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden