NSTableView - Disable Row Selection

后端 未结 8 1485
温柔的废话
温柔的废话 2021-01-01 15:25

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

8条回答
  •  时光说笑
    2021-01-01 15:30

    As a note to posterity...

    If you declare selectionIndexesForProposedSelection, then shouldSelectRow function will be ignored. Just in case you're wondering like I did why my edits to shouldSelectRow had no effect...

    https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSTableViewDelegate_Protocol/index.html#//apple_ref/occ/intfm/NSTableViewDelegate/tableView:selectionIndexesForProposedSelection:

提交回复
热议问题