NSTableView is selected but not editable

Trying to get NSTableView in IB for selection, but not editable. But deselecting "Editable" for a column also eliminates the option.

Can someone tell me where I have to paste this code in order for it to work (doesn't work in the application delegate or window controller):

NSTextFieldCell *aCell = [tableColumn dataCell]; [aCell setEditable: NO]; [aCell setSelectable: YES]; 

BTW, this table is updated by dictionary binding, and the controller dictionary is configured to be unavailable.

+4
source share
2 answers

Set the columns to Editable , but the behavior of a single cell in Selectable .

+6
source

I would try to implement tableView:shouldEditTableColumn:row: in your Delta NSTableViews and return NO. See here .

+2
source

Source: https://habr.com/ru/post/1369282/


All Articles