Right-click the Add-in Definition node and select
Template Definition to add a
Template Definition subnode (
) where you can define a form template for use when creating apps.
You can right-click the Template Definition node to add subnodes that will produce a tab in the Form wizard to add content of a certain type. The subnodes can be of the following types:
Commands,
Graphics, and
Inputs/Outputs. These nodes are used to provide a mapping between where content added on a certain tab in the Form wizard should be added on the generated form. Each subnode represents one tab in the Form wizard, and each subnode can have at most one target. The type of the form container referred to from the content definition subnodes will determine how content added from the corresponding tab in the Form wizard is added. The tabs will be shown in the same order as the content definition nodes have been added to the
Template Definition node. Content is added in the order that it appears in the
Selected tree to the right on the
Select Content page in the Form wizard and starting by the leftmost tab in the Form wizard. Also, existing content in the form collections in the template form is not cleared, meaning that the layout template can contain a couple of sections or tabs that are always there, followed by sections and tabs that have been defined as groups in the Form wizard.
You can add several subnodes of different types as subnodes to a Template Definition node. That way, you can define several locations where content of a particular type can be added (in particular, you might want to have input and output in different locations or some side-by-side arrangement with several different graphics containers).
To add the user-defined form template, specify a suitable location for the add-in, click Create Add-in, and, if needed, add the location of the user-defined form template in the
Add-in Libraries window. A single MPH-file can be used to produce both add-ins with form templates and add-ins with form and methods used for settings forms, and so on.
The Settings window contains a
Label field where you can enter the label of the template definition and a
Based on form list, where you can select which of the forms in the add-in that should be used to define the template. The label is used when the template is displayed in the list of available templates in the Form wizard.
Under Description, enter a description of the form template, its contents, and use cases, as desired.
Using the Preview image list, you can provide an image that is displayed when the form template is selected in the first step in the Form wizard to allow users to see what type of layout that the template will produce. Click the
Add Image to Library and Use Here button (
) to add more images to use as a preview image. The chosen preview image appear under
Preview (recommended size 800 x 600 px).