ExtendSelect Method (ListBox ListView)

Class

ListBox and ListView.

Action

Selects a range of items by extending the selection in a list box.

Availability

This functionality is supported only if you are using the Classic Agent.

Syntax

listbox.ExtendSelect (item)
Variable Description
item The item to which to extend the selection. LISTITEM.

Notes

ExtendSelect extends the list selection by scrolling the item into view and selecting it.

ExtendSelect requires that the list already has a selected item. Precede the call with a call to Select to select the first item.

After you select the end of the range, Silk Test Classic verifies that the item is selected and raises the exception E_CONTROL_NOT_RESPONDING if it is not selected.

Example

// Selects the items between earth and water, inclusive 
DialogBox1.Elements.Select("earth") 
DialogBox1.Elements.ExtendSelect("water")