开发者

disable NSTableView double click

I hope to disable NSTableView row double click and forbid row item edit.

Is it possible to disable NSTableView row开发者_开发技巧 double click?

Welcome any comment


Try including this method and return NO:

- (BOOL)tableView:(NSTableView *)aTableView
shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
    return NO;
}

Also check out the documentation for NSTableView.


  1. You can use Tableview delegate method `tableView:shouldEditTableColumn:row
  2. Or you can also disable this from Interface builder
  3. or you can also overwrite mouse click event of tableview

.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜