NSTableView Right Clicked Row Index

后端 未结 5 1315
太阳男子
太阳男子 2020-12-29 09:16

I\'m looking for a way to get right-clicked row index from NSTableView but I can\'t find any delegate methods or class attributes for it. Any suggestion is appr

5条回答
  •  盖世英雄少女心
    2020-12-29 09:45

    Use the NSTableView method - (NSInteger)clickedRow to get the index of the last clicked row. The returned NSInteger will be the index of the right clicked row.

    You do not need to subclass NSTableView for this solution. clickedRow is also available on NSOutlineView.

提交回复
热议问题