property Items.SelectItem(Item as HITEM) as Boolean

Selects or unselects a specific item.

TypeDescription
Item as HITEM A long expression that indicates the item's handle being selected.
Boolean A boolean expression that indicates the item's state. True if the item is selected, and False if the item is not selected.

Use the SelectItem property to programmatically select an item. The SelectItem property indicates whether an item is selected or not selected, giving its handle. Use the SelectedItem property to get the selected items, giving their indexes. The control fires ViewStartChanging(exSelectionChange) / ViewEndChanging(exSelectionChange) event when the user changes the selection. The SelectCount property counts the selected items in the control, when the control supports multiple selection. Use the SingleSel property to specify whether the control supports single or multiple selection. If the SingleSel property is True, the user can select a single item only. Use the FullRowSelect property to specify how the user can select the cells or items using the mouse. The FocusItem property specifies the handle of the focused item. The control can have only a single focused item. If the control supports single selection, the FocusItem property gets the selected item too. Use the EnsureVisibleItem property to ensure that an item is visible. Use the SelBackColor property to indicate the background color for selected items. Use the SelForeColor property to specify the foreground color for selected items. The SelectPos property selects/unselects items by position. The Selection property selects/unselects items by index.