I have a pas unit defining a component.
How can I add it to the palette? the only way I know is to include it in a package, is tehre a direct way to do it?
In a package, have a unit that has a procedure named Register
— the capitalization is important. In that procedure, call RegisterComponents
on the component you'd like to appear on the Tool Palette.
You must use packages. That's the only way the IDE will load the executable code; it cannot execute DCU files directly. If you don't already have some other package to use, you can add your component to the DclUsr package.
With component libraries of any appreciable complexity, there will usually be at least two packages. There will be a run-time package that contains all the components, and then there will be a design-time package that contains the Register
procedures.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With