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

# TMenuItem.GetParentComponent

Gets the menu for the Parent component when available.

## Declaration

Source position: menus.pp line 266

`public function TMenuItem.GetParentComponent: TComponent; override;`

## Function result

Parent menu item or menu for the current class instance.

## Description

Overridden to ensure that the TMenu instance for the Parent menu item is used (when assigned). If not assigned, the value in Parent is returned. GetParentComponent does not call the inherited method.

## See also

TComponent.GetParentComponent