DeselectRange

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


The DeselectRange method removes the selection for 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 deselected. If this argument is omitted, the deselection range starts with the first item in the list.

endIndex

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

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

Return value:

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

Example:

The following example deselects the items 1 through 5:

lb = self~GetListBox("Offers")
if lb == .Nil then return
lb~DeselectRange(,6)