SelectRange

>>-aListBox~SelectRange(--+-----------------------------+--)---><
                          +-startIndex--+-------------+-+
                                        +-,--endIndex-+


The SelectRange method selects one or more consecutive items of the associated multiselection list box.

Arguments:

The arguments are:

startIndex

The position of the first list item to be selected. If this argument is omitted, the selection range starts with the first item in the list.

endIndex

The position of the last list item to be selected. If this argument is omitted, the selection range ends with the last item in the list.

If startIndex is equal to endIndex, a single item of the list is selected.

Return value:

-1 if an error occurred. This can happen, for example, if the list box is not a multiselection list box.

Example:

The following example selects the items 5 through 9:

lb = self~GetListBox("Offers")
if lb == .Nil then return
lb~SelectRange(5,9)