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

# TListItems.GetEnumerator

Gets an enumerator for the list items in the container.

## Declaration

Source position: comctrls.pp line 1181

`public function TListItems.GetEnumerator: TListItemsEnumerator;`

## Function result

TListItemsEnumerator instance used to access the list item values in the container.

## Description

GetEnumerator is a TListItemsEnumerator function which returns an enumerator for the TListItem instances in the indexed Item property. It creates the TListItemsEnumerator instance in the return value using the current class instance as the container with the enumerated values.

Remark: | The enumerator returned from the method is not pre-positioned on the first list item. Call the MoveNext method in the enumerator prior to accessing its Current property.

## See also

TListItems.Item |  | Provides indexed access to the TListItem instance in the container by their ordinal position.
TListItem |  | Represents the items created in TCustomListView and descendants.
TListItemsEnumerator.MoveNext |  | Moves to the next value for the enumerator.
TListItemsEnumerator.Current |  | Current value for the enumerator.