NSTableView - 禁用行选择 [英] NSTableView - Disable Row Selection

查看:180
本文介绍了NSTableView - 禁用行选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

表视图的列绑定到 NSArrayController ,并且数组的内容会显示在表视图中。

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

我如何这只是使用绑定

推荐答案

使用TableViewDelegate和实现

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

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

这篇关于NSTableView - 禁用行选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆