From RAD Studio API Documentation
Jump to: navigation, search


constructor Create(AOwner: TComponent); override;


__fastcall virtual TCustomMenuButton(System::Classes::TComponent* AOwner);


Type Visibility Source Unit Parent
constructor public
Vcl.ActnMenus TCustomMenuButton


Creates an instance of TCustomMenuButton.

Calling Create constructs and initializes an instance of TCustomMenuButton. However, you should never attempt to instantiate a TCustomMenuButton. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendants.

AOwner is the component that is responsible for freeing the menu button instance. It becomes the value of the Owner property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note: If a component's constructor allocates resources or memory, also override the destructor to free those resources.

See Also