Standard highlighting color in OS X applications is blue.在OS X应用程序的标准突出显示颜色是蓝色的。
Is it possible to change it to another color, eg gray?是否有可能将其更改为另一种颜色,如灰色?
Note that I am using the new view-based NSTableView
available starting from OS X 10.7.请注意,我使用新的基于视图的NSTableView
从OS X 10.7。
Since you're using the view based NSTableView, you can subclass NSTableRowView, feed it to the table delegate method
- (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row;
, then customize your selection in the row view class.由于您使用的浏览NSTableView的,你也可以继承NSTableRowView,将它输入到表中的委托方法- (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row;
,然后定制选项行中的视图类。Here's an example:下面是一个例子: