[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCustomListView.SelCount

Number of currently selected Items when MultiSelect is enabled.

## Declaration

Source position: comctrls.pp line 1684

`public property TCustomListView.SelCount : Integer read GetSelCount;`

## Description

SelCount is a read-only Integer property with the number selected entries in Items. SelCount is relevant when MultiSelect is set to True; otherwise, the single selected item is found in the Selected property.

If the Handle has been allocated for the widgetset class, the value from the GetSelCount method is used as the property value. Otherwise, the property value is calculated by counting the number of TListItem instances in Items that have their Selected property set to True. The return value is 0 when none of the Items have a selected property set to True.

Use GetNextItem with the lisSelected item state to retrieve a multi-selected item that is adjacent to another selected item.

## See also

TCustomListView.MultiSelect |  | Allows simultaneous selection of one or more list items using Ctrl+Click, Shift+Click, Ctrl+Shift+Click, or using program code.
TCustomListView.Selected |  | Contains the selected list item in the list view control.
TCustomListView.Items |  | Collection of list items displayed on the list view control.
TCustomListView.GetNextItem |  | Gets the next list item in the given direction from the starting item.
TListItem.Selected |  | Whether this Item has been Selected (often denoted by a check-mark).
TListItems |  | Implements a container for list items on a list view control.