WinXListBox_SetSelection


WinXListBox_SetSelection (hListBox, index[])

Sets the selection in a list box

Parameter Description
hListBox The handle to the list box to set the selection for
index[] An array containing the 0 based indecies of the items to select

Returns

$$TRUE on success or $$FALSE on fail

Remarks

If the multiSelect parameter was $$FALSE when the list box was created, then index[] must contain a single element. To select multiple items, simply dimension index[] to hold the appropriate number of elements.

Examples

'select the first item in the list
DIM index[0]
index[0] = 0
WinXListBox_SetSelection (hLB, index[])

Related Links

WinXAddListBox
WinXListBox_SetCaret
WinXListBox_GetSelection