Disable color change when the original list loses focus

When an item is selected in the source list, it is highlighted in blue. However, when another item in the window is selected, the backlight turns light blue because the original list no longer focuses.

I would like to change the behavior so that the element is always darker, just like in Finder.

+6
cocoa nstableview
source share
1 answer

It looks like the original Finder list never became a fist responder, so I assume the first step is to subclass your table or schema view, as well as implement the (BOOL) acceptFirstResponder method

- (BOOL)acceptsFirstResponder { return NO; } 

This will make the selection of the source list always light blue, and you can use some undocumented methods like _highlightColorForCell to change the highlight color.

+5
source share

All Articles