Vcl.Menus.TMenuItem.GetParentComponent
Delphi
function GetParentComponent: TComponent; override;
C++
DYNAMIC System::Classes::TComponent* __fastcall GetParentComponent();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Menus.pas Vcl.Menus.hpp |
Vcl.Menus | TMenuItem |
Description
Returns the parent component of the menu item.
GetParentComponent is called by the streaming system that loads and saves components. It ensures that objects are loaded and saved with their parent objects. GetParentComponent is overridden in descendant classes to return the appropriate parent for their particular type of component. TMenuItem overrides it to identify its associated menu, if it has one, as its parent.