SelItems Property
Applies To: Combo ComboEx Grid List ListView TreeView

Description

This property determines which (if any) of the items in an object are currently selected and highlighted. Except in a Grid, it is a Boolean vector with one element per item in the list. A value of 1 means "selected"; 0 means "not selected".

This property is used after a Select event to identify which item has been chosen. In a Combo or a List with Style 'Single' it will contain only a single 1.

SelItems should also be used to pre-set the contents of the edit field in a Combo box with Style 'Drop'. In Combo boxes with Style 'Simple' or 'DropEdit', the contents of the edit field may also be specified by the Text property. If you specify both, the value of Text takes precedence.

In a Grid, SelItems is a 2-element integer vector. The first element identifies the row and column coordinates respectively of the first cell(s) in the selected block(s) and the second, the row and column coordinates of the last cell(s) in the selected block(s). If the CellSelect property allows only a single block of cells to be selected, each set of coordinates is a 2-element vector. If the CellSelect property permits more than one block of cells to be selected, each set of coordinates is a 2-column matrix with one row per selected block, whose columns identify the first row and column, and the last row and column respectively of each selected block.