Re: Selecting rows in NSOutlineView from menuForEvent:?
Re: Selecting rows in NSOutlineView from menuForEvent:?
- Subject: Re: Selecting rows in NSOutlineView from menuForEvent:?
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 9 Apr 2010 15:10:44 -0600
On Apr 9, 2010, at 2:46 PM, Laurent Daudelin wrote:
> I wrote a subclass of NSOutlineView to handle menuForEvent: so that I can provide my own menu of items that can be performed. It works well but I did notice that in all other outline or table views, a right-click will highlight the rows that were right-click with an outline and change the view selection to the row(s) that were clicked by the right-click. How can I do that?
Did you try overriding -rightMouseDown: to make the selection & then invoke the superclass? You can make the selection by taking the event location, converting it from window to view coordinates, and then using -rowAtPoint: to get the row number.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden