Adding Multiple Components to an Existing Package

From Delphi for PHP Documentation Wiki

Jump to: navigation, search

Summary: Describes how to install custom components onto the Tool Palette.


Each package can contain multiple components which can be installed on the "Tool Palette" in IDE. To accomplish this, simply add new components as needed without creating a new package file, then register them in the package file. To add custom components to an existing package

  • Choose

  ComponentImage:pathPDF.jpgNew Component and use the "New Component" dialog box to create each additional component for your package.

Note:

Uncheck "Create Package" in the dialog box since the package already exists.

  • Save each new component to the same subfolder in the Delphi for PHP  vcl folder as the package to which you want it to belong.
  • Open the package file  <name>

.package.php .

  • Add a  registerComponents()''''' method for each component you want to appear in the IDE on the "Tool Palette".


For example, the

 
//Change yourunit.inc.php to the php file which contains the component code</font>
registerComponents("Samples",array("MyLabel"),"MyCustomComponents/MyLabel.inc.php");
registerComponents("Samples",array("MyButton"),"MyCustomComponents/MyButton.inc.php");
registerComponents("Samples",array("MyCheckBox"),"MyCustomComponents/MyCheckBox.inc.php");
 
  • Install the package to the IDE.

Adding Packages

Creating a Project

Opening a Project

Adding and Removing Files

Personal tools