System.Classes.RegisterComponents
Delphi
procedure RegisterComponents(const Page: string;
ComponentClasses: array of TComponentClass);
C++
extern DELPHI_PACKAGE void __fastcall RegisterComponents(const System::UnicodeString Page, TComponentClass *ComponentClasses, const int ComponentClasses_High);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | System.Classes |
Description
Registers the ComponentClasses
components so that they all appear on the same Page
of the Tool Palette.
Call RegisterComponents to register a set of components declared in a package installed in the IDE. Once a component is registered, it appears on the Tool Palette, where it can be selected and placed on forms or data modules. Registered components can communicate with the Object Inspector to allow the user to get and set properties and events.
Set the Page
parameter to the name of the page (category) on the Tool Palette where the components should appear. If the Page
named category already exists, the components are added to that page. If the Page
category does not exist, a new Tool Palette page with that name is created.
Pass the components to be registered in the ComponentClasses
parameter.
ComponentClasses_High
parameter indicates the index of the last class in the ComponentClasses
array (one less than the number of classes).Call RegisterComponents from the implementation of the Register procedure in one of the units that defines the custom components. The units that define the components must then be compiled into a package and the package must be installed in the IDE before the custom components appear in the Tool Palette.
Use ForceDemandLoadState to specify whether the IDE should use smart loading of registered components.
See Also
- DesignIntf.ForceDemandLoadState
- Packages
- Installing Component Packages
- Design-time Packages
- Registering Components
- Declaring the Register Procedure
- Writing the Register Procedure
- Using the RegisterComponents Procedure
- Using Styles Defined by Components in Design-Time Packages Installed in the IDE
- System.Classes.UnRegisterClasses
Code Examples