Registration involves writing a single procedure in the unit, which must have the name Register. The Register procedure must appear in the interface part of the unit, and (unlike the rest of Delphi) its name is case-sensitive.
unit MyBtns; interface type ... { declare your component types here } procedure Register; { this must appear in the interface section } implementation ... { component implementation goes here } procedure Register; begin ... { register the components } end; end.
namespace Newcomp { void __fastcall PACKAGE Register() { } }
Within the Register procedure, call RegisterComponents for each component you want to add to the Tool palette. If the unit contains several components, you can register them all in one step.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|