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

# TMenuItem.Remove

Removes the specified menu item from its Parent.

## Declaration

Source position: menus.pp line 287

`public procedure TMenuItem.Remove(`
`Item: TMenuItem`
`);`

## Arguments

`Item` |  | Menu item removed in the method.

## Description

Remove is a method used to locate and delete the menu item specified in Item. Remove call IndexOf to get the position in Items where the menu item is stored. An EMenuError exception is raised if the menu item in Item is not found in the Items property.

Remove calls the Delete method to free the handle and the menu item instance at the required position.