GetComponentDesignTemplate method (WinStudio scripts)

Applies To

IWSFormWizard interface

Definition

Wizard form script to retrieve a component template.

Remarks

This method retrieves a component template, which can be then applied to the form definition.

Note: Script APIs defined in the IWSFormWizard interface are designed to be used within the wizard form type only.

Example

var template = Designer.FormWizard.GetComponentDesignTemplate( "<templateName" );
var tmpDef = template.Definition;

// Adjust template as needed:
template.ApplyContainer( "<containerComp>" );
template.ApplyPosition( new FormPosition( 5d, 5d ) );
template.ApplySize( new FormSize( 100d, 10d ) );
// tmpDef.LayoutAttributes = “...”

newFormDef.ApplyTemplate( new FormDefTemplate
{
   FormWizard = Designer.FormWizard,
   Template = template,