Interface IListBase<T>
Base interface for some .NET Windows Forms list controls.
public interface IListBase<T>
Type Parameters
T
Properties
Items
Returns the items in this list.
ReadOnlyCollection<T> Items { get; }
Property Value
SelectedItems
Returns the selected items in this list.
ReadOnlyCollection<T> SelectedItems { get; }
Property Value
Methods
ActivateItem(int, MouseButton)
Activates (double-clicks) the specified item in this list by item index.
void ActivateItem(int itemIndex, MouseButton button = MouseButton.Left)
Parameters
itemIndexintThe index of the item to activate.
buttonMouseButtonOptional. The mouse button used to activate the item. Possible values: MouseButton Default value: MouseButton.Left
ActivateItem(string, MouseButton)
Activates (double-clicks) the specified item in this list.
void ActivateItem(string item, MouseButton button = MouseButton.Left)
Parameters
itemstringThe item to activate.
buttonMouseButtonOptional. The mouse button used to activate the item. Possible values: MouseButton Default value: MouseButton.Left
ActivateItem(T, MouseButton)
Activates (double-clicks) the specified item in this list.
void ActivateItem(T item, MouseButton button = MouseButton.Left)
Parameters
itemTThe specified item to activate from this list.
buttonMouseButtonOptional. The mouse button used to activate the item. Possible values: MouseButton Default value: MouseButton.Left
Deselect(params int[])
Deselects a list of items by items indices.
void Deselect(params int[] itemIndices)
Parameters
itemIndicesint[]The specified item indices collection to deselect.
Deselect(params string[])
Deselects a list of items.
void Deselect(params string[] items)
Parameters
itemsstring[]The specified item collection to deselect.
Deselect(params T[])
Deselects a list of items.
void Deselect(params T[] items)
Parameters
itemsT[]The item collection to deselect.
ExtendSelect(params int[])
Selects additional items from the multi-selection list, by indices.
void ExtendSelect(params int[] itemIndices)
Parameters
itemIndicesint[]The item indices to add to the selection.
ExtendSelect(params string[])
Selects additional items from the multi-selection list, by name.
void ExtendSelect(params string[] items)
Parameters
itemsstring[]The item names to add to the selection.
ExtendSelect(params T[])
Selects additional items from the multi-selection list, by items.
void ExtendSelect(params T[] items)
Parameters
itemsT[]The items to add to the selection.
GetItem(string)
Returns the item with the specified text.
T GetItem(string text)
Parameters
textstringThe text of the item to return.
Returns
- T
Select(params int[])
Selects a list of items by items indices.
void Select(params int[] itemIndices)
Parameters
itemIndicesint[]The specified item indices collection to select.
Select(params string[])
Selects a list of items.
void Select(params string[] items)
Parameters
itemsstring[]The specified item collection to select.
Select(params T[])
Selects a list of items.
void Select(params T[] items)
Parameters
itemsT[]The item collection to select.
SelectRange(int)
Selects all list items between the currently selected item and the specified last item index.
void SelectRange(int itemIndexLast)
Parameters
itemIndexLastintThe index of the last item to select.
SelectRange(int, int)
Selects all list items between (and including) the two specified items.
void SelectRange(int indexFrom, int indexTo)
Parameters
indexFromintThe 0-based index of the first item in the range.
indexTointThe 0-based index of the last item of the range.
SelectRange(string)
Selects all list items between the currently selected item and the specified item.
void SelectRange(string itemNameLast)
Parameters
itemNameLaststringThe name of the last item to select.
SelectRange(string, string)
Selects all list items between (and including) the two specified item names.
void SelectRange(string itemNameFrom, string itemNameTo)
Parameters
itemNameFromstringThe name of the first item in the range.
itemNameTostringThe name of the last item of the range.
SelectRange(T)
Selects all list items between the currently selected item and the specified last item.
void SelectRange(T itemLast)
Parameters
itemLastTThe last item to select.
SelectRange(T, T)
Selects all list items between (and including) the two specified list items.
void SelectRange(T itemFrom, T itemTo)
Parameters
itemFromTThe first item in the range.
itemToTThe last item of the range.