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

# TListItem.Index

Ordinal position for the list item in its TListItems container.

## Declaration

Source position: comctrls.pp line 1079

`public property TListItem.Index : Integer read GetIndex;`

## Description

Index is a read-only Integer property with the position where the list item in stored in its TListItems container. The property value is retrieved by calling the IndexOf method in the Owner (TListItems) to locate the class instance. The property value is -1 if Owner has not been assigned, or the list was removed from the container.

Use the Move or Exchange methods in TListItems, or the sort routines in TCustomListView, to change the position where a list item is stored in its container.

## See also

TListItems.IndexOf |  | Gets the ordinal position in the container for the specified list item.
TListItems.Move |  | Moves the list item at the specified position to a new position in the container.
TListItems.Exchange |  | Exchanges the positions for the specified list items in the container.
TCustomListView.AutoSort |  | Controls automatic updates to the sort column and order indicator for the control.
TCustomListView.SortType |  | Specifies the sorting mechanism used for the current SortColumn.
TCustomListView.Sort |  | Sorts the values in Items using the SortType, SortColumn, and SortDirection for the control.
TCustomListView.AlphaSort |  | Sorts the first column for the list view control in ascending alphabetic order.
TCustomListView.CustomSort |  | Sorts the Items for the list view control using the specified procedure or the OnCompare event handler.