gpt4 book ai didi

cocoa - NSTableView - 禁用行选择

转载 作者:行者123 更新时间:2023-12-03 16:01:55 24 4
gpt4 key购买 nike

我有一个 NSTableView,我想禁用行选择。

TableView 的列绑定(bind)到 NSArrayController 并且数组的内容确实显示在 TableView 中。

如何仅使用绑定(bind)来做到这一点?

最佳答案

我认为您需要使用 TableViewDelegate 并实现

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

关于cocoa - NSTableView - 禁用行选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7285417/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com