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

# TCustomListView.FindData

Locates a list item with a given value starting from the specified position in Items.

## Declaration

Source position: comctrls.pp line 1636

`public function TCustomListView.FindData(`
`StartIndex: Integer;`
`Value: Pointer;`
`Inclusive: Boolean;`
`Wrap: Boolean`
`):TListItem;`

## Arguments

`StartIndex` |  | Ordinal position in Items for the first entry examined in the method.
`Value` |  | Pointer to the data for the list item to locate in the method.
`Inclusive` |  | True if the item at the position in StartIndex is included in the compared values. False if the comparison starts on the item following StartIndex.
`Wrap` |  | True if the search can wrap to the top of the list if an item is not found. False if the search ends at the last item in the list.

## Function result

TListItem instance which contains the specified Data, or Nil if a list item is not found in the method.

## Description

FindData is a TListItem function used to locate the list item which has the value specified in the Data argument. FindData calls the FindData method in Items to get the return value (TListItem) for the method.

## See also

TCustomListView.Items |  | Collection of list items displayed on the list view control.
TListItems.FindData |  | Locates the list item which has the specified values in its Data property.
TListItem |  | Represents the items created in TCustomListView and descendants.