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

# TMenuItem.GetEnumerator

Gets an enumerator for the child menu Items in the class instance.

## Declaration

Source position: menus.pp line 263

`public function TMenuItem.GetEnumerator: TMenuItemEnumerator;`

## Function result

TMenuItemEnumerator instance for the Items in the class.

## Description

GetEnumerator is a TMenuItemEnumerator function used to get an enumerator for the TMenuItem instances in the Items property. It re-introduces the method from TComponent to return the TMenuItemEnumerator type.

## See also

TMenuItem.Items |  | Provides indexed access to the child menu items for the current class instance.
TMenuItemEnumerator |  | Implements an enumerator for child menu items in the specified TMenuItem instance.
TComponent.GetEnumerator