how to perform multiple selection in NSTableView
I am a beginner to objective c.Please tell me that how perform multiplay selection in NSTableView.I am unable to retain previous selection, when i am clicking on ano开发者_StackOverflow社区ther row.
You have to enable multiple selection on the table view by calling:
[tableView setAllowsMultipleSelection: YES]
You can then select multiple rows by pressing Command+Click on the rows you want.
The method call you are looking for is
- (void)selectRowIndexes:(NSIndexSet *)indexes byExtendingSelection:(BOOL)extend
I hope you would have got the answer, but the better way is, when you click the check box, you could select the row by using api selectRowIndex and once you want to process, you could get all the selectedItemindexes,
精彩评论