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

# TCustomListView.GetFirstSelected

Gets the first item in the list view with its Selected property set to True.

## Declaration

Source position: comctrls.pp line 1570

`protected function TCustomListView.GetFirstSelected: TListItem;`

## Function result

The first TListItem instance with its Selected property set to True.

## Description

The return value is the TListItem instance returned from the corresponding method in the widgetset class instance.

GetFirstSelected is called when the value for the Selected property is read when both MultiSelect and OwnerData are enabled.

## See also

TCustomListView.Selected |  | Contains the selected list item in the list view control.
TCustomListView.MultiSelect |  | Allows simultaneous selection of one or more list items using Ctrl+Click, Shift+Click, Ctrl+Shift+Click, or using program code.
TCustomListView.OwnerData |  | Enables or disables owner data (virtual) mode for the list view control.
TListItem |  | Represents the items created in TCustomListView and descendants.