Type | Description | |||
Index as Long | A long expression that indicates the index of the item. | |||
Boolean | A boolean expression that indicates whether the item is selected or unselected. |
The following VB sample selects the first visible item:
With List1.Items .SelectItem(.FirstVisibleItem) = True End With
The following VB sample selects all items in the list:
With List1 .BeginUpdate With .Items For i = 0 To .Count - 1 .SelectItem(i) = True Next End With .EndUpdate End With
The following C++ sample selects the first visible item:
#include "Items.h" CItems items = m_list.GetItems(); items.SetSelectItem( items.GetFirstVisibleItem(), TRUE );
The following VB.NET sample selects the first visible item:
With AxList1.Items .SelectItem(.FirstVisibleItem) = True End With
The following C# sample selects the first visible item:
axList1.Items.set_SelectItem(axList1.Items.FirstVisibleItem, true);
The following VFP sample selects the first visible item:
with thisform.List1.Items .SelectItem(.FirstVisibleItem) = .t. endwith