Reputation: 11
How to know how many rows and columns are selected in a NSMatrix ? I tried many things but it does not work.
I thought about first getting the selected cells by calling selectedCells
method of NSMatrix
but then I don't know what to do. I should save somewhere in each cell instance its position (row/col) inside the NSMatrix
? Is there another solution?
Upvotes: 1
Views: 296
Reputation: 10182
You can find out how many are selected by doing this:
NSArray *selectedArray = [myMatrix selectedCells];
NSUInteger selectedNum = [selectedArray count];
Where myMatrix
is your NSMatrix
instance.
Upvotes: 1