I'm still struggling with the view-based NSOutlineView in my little Cocoa application. I'm trying model my OutlineView after the finder one. When the Finder OutlineView loses focus (e.g. clicking any folder on the right side), the selected row (e.g. Desktop) stays selected with the bright blue gradient and does not change to the inactive blue-grey gradient.
I'd like to duplicate this behaviour in my application.
In a not view-based OutlineView I was able to subclass NSOutlineView and reimplement (void)highlightSelectionInClipRect:(NSRect)clipRect
, so that each highlighted row could be supplied with the bright blue background image.
However, now with my view-based OutlineView (set to SourceList style) this method apparently is not even called. I've even implemented (id)_highlightColorForCell:(NSCell *)cell
to return nil, as some sites suggest, but that doesn't help either.
Any hints on how I can set the highlight gradient in the view-based OutlineView?