On Apr 9, 2010, at 15:17, Nick Zitzmann wrote:

> 
> On Apr 9, 2010, at 3:42 PM, Laurent Daudelin wrote:
> 
>> However, the selection is the standard highlight, not the outline I see in 
>> any other table views in other Apple applications.
> 
> I think the "drop highlighting" thing a few Apple apps do is accomplished 
> through a private API. I wouldn't worry about it too much, since you'd be 
> amazed at how many people don't even know that contextual menus exist (unless 
> your target market is exclusively power users), but you can probably do this 
> yourself by overriding the row drawing method to draw a similar-looking 
> bezier path over the top of the row.


I was looking into this myself, as I like the little ovally highlight that you 
get in 10.6 when you right click on items in a table view other than the 
currently selected item. I have the need to be able to return different menus 
based on the item that I am right clicking on and to accomplish that I had 
overridden menuForEvent. I was disappointed that I didn't get that fancy 10.6 
highlight when doing so. However, I have found that if you call [super 
menuForEvent:event] in your overridden method, you will still get the ovally 
highlight.

One point to note, however, is that doing that on 10.5 and *not* selecting the 
row causes you to get a box highlight on the row, with an empty background. So 
in the end I am doing a check to see if I am running on 10.5. If I am, I just 
change the row selection to the row where the event was fired and then do my 
menu determination. If it's not 10.5, I call the [super menuForEvent:event] 
call and go on my merry way.

Hope that helps,

Ryan_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to