Setting 2nd TextColor for NSTextField in NSOutlineView

67 views Asked by At

When using the default color black for a NSTextfield in a View-based NSOutlineView it gets white when selected. When i set a custom textColor in IB, it will stick with it. Where can i set the second textColor?

1

There are 1 answers

0
user3005567 On

http://blog.the-skylab.de/2013/03/21/custom-selectionhighlighting-colors-in-a-view-based-nstableview-or-nsoutlineview-badge/

I'm doing it like this. Subclass NSTextfield and overwrite drawRect: and add a backgroundStyle property.

Works most of the time, but better than nothing. BackgroundStyle is not the same as highlight, but near ;)