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

# TOwnerDataListItem.SetOwner

Sets the TListItems container which owns the virtual list item.

## Declaration

Source position: comctrls.pp line 1111

`public procedure TOwnerDataListItem.SetOwner(`
`AOwner: TListItems`
`);`

## Arguments

`AOwner` |  | TListItems instance which owns the virtual list item.

## Description

Changing the owner for the list item causes values in internal members to be cleared, including:

- Flags (an empty set).
- States (an empty set).
- ImageIndex (-1 for the unassigned value).
- SubItems (frees the TStrings instance for the member).

## See also

TCustomListView.Items |  | Collection of list items displayed on the list view control.
TListItems |  | Implements a container for list items on a list view control.