Search code examples
objective-cnsoutlineview

Modify color of NSOutlineView in code


I' ve a subclass of NSOutlineView that use View as cells (I use a TextField). The problem is that i Can simply change the color of the row in IB changing the TextFieldCell color but I can' t do that in code. Can anyone help me? thanks!


Solution

  • After a lot of research I found that the solution is to override the NSOutlineView method - (void)highlightSelectionInClipRect:(NSRect)theClipRect and draw your custom highlight.