Link Search Menu Expand Document

SSpread.GetMultiSelItem Method

Explanation Gets the number of the selected line in multiple selection mode.

This is valid only when the OperationMode property is $OperationModeMulti (multiple selection mode) and $OperationModeExtended (extended multiple selection mode).

Call this method repeatedly to find out the numbers of all the selected lines. When examining the first line, specify 0 for the argument prev. When looking at the next line, set the return value of the first call to the argument prev. If there are no more rows selected, -1 is returned.

The number of selected lines can be obtained with the SelectionCount property. Use the SelModeSelected property to select a row from the CRS program.
Call format GetMultiSelItem(prev)
Return value Selected line number
Arguments prev The number of the selected line immediately before (0 to line number)
Exception None
Example of use
    OperationMode = $OperationModeMulti;
    Function OnClicked(e) {
        var prev = GetMultiSelItem(0);
        while (prev >= 0) {
            print(prev, " ");
            prev = GetMultiSelItem(prev);
        }
        print("\n");
    }
    
Related item OperationMode, SelectionCount, SelModeSelected properties