• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Selecting rows in NSOutlineView from menuForEvent:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Selecting rows in NSOutlineView from menuForEvent:?
      • From: Laurent Daudelin <email@hidden>
References: 
 >Selecting rows in NSOutlineView from menuForEvent:? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Selecting rows in NSOutlineView from menuForEvent:?
  • Next by Date: Re: Selecting rows in NSOutlineView from menuForEvent:?
  • Previous by thread: Selecting rows in NSOutlineView from menuForEvent:?
  • Next by thread: Re: Selecting rows in NSOutlineView from menuForEvent:?
  • Index(es):
    • Date
    • Thread