Standard highlighting color in OS X applications is blue.
Is it possible to change it to another color, e.g. gray?
Note that I am using the new view-based
Some modifications to Jean-Pierre answer
Use the following code in response to the NSTableViewDelegate protocol tableViewSelectionDidChange:
Get the NSTableRowView for the selected row and call the method setEmphasized on it. When setEmphasized is set to YES you get the blue highlight, when NO you get the gray highlight.
-(void)tableViewSelectionDidChange:(NSNotification *)aNotification {
NSInteger selectedRow = [myTableView selectedRow];
NSTableRowView *myRowView = [myTableView rowViewAtRow:selectedRow makeIfNecessary:NO];
[myRowView setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleRegular];
[myRowView setEmphasized:NO];
}
And to avoid dancing effect of blue then gray set
[_tableView setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone];