RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenuItem.GetParentComponent Method

Returns the parent component of the menu item.

Pascal
function GetParentComponent: TComponent; override;
C++
virtual __fastcall TComponent * GetParentComponent();

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!