NSTableView - Disable Row Selection

ericg picture ericg · Sep 2, 2011 · Viewed 9.9k times · Source

I have a NSTableView and I want to disable row selection.

The columns of the table view are bound to a NSArrayController and the content of the array does show up in the table view.

How can I do this just using bindings?

Answer

user846945 picture user846945 · Sep 2, 2011

I think you'll need to use a TableViewDelegate and implement

- (NSIndexSet *)tableView:(NSTableView *)tableView 
    selectionIndexesForProposedSelection:(NSIndexSet *)proposedSelectionIndexes