Turning a package into a component
Let's continue working with the HideString
example and turn it into a component that gets installed on Delphi's Tool Palette. First, we'll copy and rename the demo project and package over to a new set of folders. Then, we'll use the New Component wizard to create an empty design-time package that gets registered in Delphi as a component and brings in our runtime package. Finally, we'll add some properties and expand the HideString
function to be a little more useful and make it easy to configure. Each step is detailed in the following sections.
For reference through these steps, here are the project filenames I will use (everything will be in the same folder for simplicity):
HideStringComponentDemo.dpr
: FireMonkey demo application (renamed)HideStringRT.dpk
: Runtime package (renamed fromHideStringPkg
)HideStringDT.dpk
: Design-time package (new)
Let's dive in!