RAD Studio
ContentsIndex
PreviousUpNext
Creating a New VCL Component

You can use the New VCL Component wizard to create a new VCL component. The wizard detects which personality of the product you are using and creates the appropriate type of component.

To create a new VCL component

  1. Specify an ancestor component.
  2. Specify the class name.
  3. Create a unit or add the unit to a package.

To specify an ancestor component

  1. Choose FileNewOtherDelphi Projects and double-click the Package icon. The VCL Forms Designer is displayed.
  2. Choose ComponentNew VCL Component. This displays the first page of the New VCL Component wizard. By default, it should be set to Delphi for VCL Win32.
  3. Click Next. This displays the second page of the New VCL Component wizard and loads the page with ancestor components.
  4. Select an ancestor component from the list.
  5. Click Next. This displays the third page of the New VCL Component wizard.

To specify a class name

  1. If you want to change the default class name, enter it in the Class Name textbox.
  2. Enter the name of the area on the Tool Palette where you want the component to appear in the Palette Page textbox.
  3. Enter the unit name in the Unit Name textbox.
  4. Enter the search path in the Search Path textbox.
  5. Click Next.
    Note: You can also take the default values.

To create a unit

  1. Select the Create Unit radio button.
  2. Click Finish.

To install a unit into an existing package

  1. Select the Install into Existing Package radio button.
  2. Click Next. This generates a list of existing packages.
  3. Select the package you want to install the unit into.
  4. Click Finish.

To install a unit into a new package

  1. Select the Install into New Package radio button.
  2. Click Next.
  3. Enter a name for the package into the File Name textbox.
  4. Enter a description for the package into the Description textbox.
  5. Click Finish. The new unit opens in the Code Editor.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!