I have an NSTableCellView
in a view based NSTableView
which displays attributed text. So some of the words displayed are f.e. red, some blue, some bold, some normal.
The cell has white background, but as soon as the user clicks on one of the cells, I'd like to display it with a different background color and therefore need to set all the text to white for that state.
What would be the most elegant solution to this problem?
I know that I can just set the text again as normal text and not attributed text on selection and as attributed text if not selected. But then with bold and normal font it would get a bit tricky.
Is there a more elegant solution to that problem?