MultiIndex

[property icon] MultiIndex$

Returns a multiple section as a list of indices in a string

Read-only Runtime-only String property

Applies to: List Box


>

MultiIndex

In a index with the Selection property set to allow multiple selections, a list of the currently selected item indices can be obtained from this read-only string property. They are returned as 16 bit integers in Intel byte ordering. There is no indictator for the end of the list so you must use the SelCount property to see how many items are selected. Such a list can be extracted using something like

 LOCAL DIM a$(_MAXSEL)2, b$_MAXSEL*4, i, x, maxi
 a$() = .listControl1.MultiIndex$
 i = 1
 maxi = MIN(_MAXSEL, .listControl1.SelCount)
 WHILE i <= maxi DO
    $UNPACK(F=HEX(E002)) a$(i) TO x
    IF (i == 1)
        b$ = $PRINTF("%d", x)
    ELSE
        b$ = b$ & $PRINTF(",%d", x)
    END IF
    i++ 
 WEND

This property is obsolete. Use SelectedFirst instead.

See also

List Box methods, properties and events.