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

# TMenuItemEnumerator

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements an enumerator for child menu items in the specified TMenuItem instance.

## Declaration

Source position: menus.pp line 100

`type TMenuItemEnumerator = class`
`public`
`constructor Create();` |  | Constructor for the class instance.
`function MoveNext;` |  | Moves to the next position for the enumerator.
`property Current: TMenuItem; [r]` |  | Contains the TMenuItem instance at the current position for the enumerator.
`end;`

## Inheritance

`TMenuItemEnumerator` |  | Implements an enumerator for child menu items in the specified TMenuItem instance.
`TObject`

## Description

TMenuItemEnumerator is a class which implements an enumerator for child menu items for a specified TMenuItem instance. The menu item examined is passed as an argument to the constructor, and the reference is stored in an internal member variable.

TMenuItemEnumerator provides the MoveNext method used to advance the position for the enumerator, and the Current property which returns the TMenuItem instance in the child menu Items at the current enumerator position.

TMenuItemEnumerator is the type returned from the TMenuItem.GetEnumerator method.

## See also

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