Creating a Component Template
Go Up to How To Create Forms and Projects, and Write the Code Behind
You can save selected, preconfigured components on the current form as a reusable component template accessible from the Tool Palette.
To create a component template
- Place and arrange components on the form.
- In the Object Inspector, set the component properties and events as desired.
- Select the components that you want to save as a component template.
- To select several components, drag the mouse over them.
- To select all of the components on the form, choose Edit > Select All .
- Gray handles appear at the corners of each selected component.
- Choose Component > Create Component Template .
- The Component Template Information dialog box appears.
- Specify a name for the template, and a Tool Palette page (category) and icon for the template.
- Click OK.
Your new template appears immediately on the Tool Palette, in the category that you specified.
To use a component template
- Display the form to which you want to add the components from the component template.
- On the Tool Palette, double-click the component template icon.
- The components in the component template are added to the form, along with their preconfigured properties and events. You can reposition the components independently, reset their properties, and create or modify event handlers for them, just as if you had placed each component in a separate operation.
To delete a component template
- On the Tool Palette, right-click the component template to display a context menu.
- Choose the Delete [template name] Button command.
- The component template is deleted immediately from the Tool Palette.