Top  | Previous | Next

Template Repeater

Description

The Template Repeater repeats instances of templates any number of times. It can arrange them vertically, horizontally, or in a "flow" layout, which can either be top-to-bottom or left-to-right. If there are too many to fit, a scrollbar will be shown. This makes it easy to quickly create screens that represent many similar pieces of equipment. It also can be used to create screens that are dynamic, and automatically configure themselves based on configuration stored in a database or tag structure.

 

When first dropped on a window, the template repeater will look like any other empty container. To select the template to repeat, configure the repeater's Template Path property. There are two ways to set how many times the template should repeat:

Count -- The template will be repeated X times, where X is the value of "Repeat Count".
Dataset -- The template will be repeated once for each row in the "Template Parameters" dataset.The values in the dataset will be set on public template parameters which match the dataset column names (if applicable).

 

See also:

Component Layout

Containers

Templates

Properties

Appearance

Background Color

The background color of the component.

Scripting name

background

Data type

Color

Layout Style

Controls how the repeated template instances are laid out inside the repeater.

Scripting name

layoutStyle

Data type

int

Values

0

Vertical

1

Horizontal

2

Flow

Flow Direction

When the layout style is flow, this property controls if the components in the container flow horizontally or vertically.

Scripting name

flowDirection

Data type

int

Values

0

Horizontal

1

Vertical

Flow Alignment

Alignment for "Flow" layout style.

Scripting name

flowAlignment

Data type

int

Values

0

Left / Top

2

Right / Bottom

1

Center

Horizontal Gap

The gap size to use for horizontal gaps.

Scripting name

horizontalGap

Data type

int

Vertical Gap

The gap size to use for vertical gaps.

Scripting name

verticalGap

Data type

int

Behavior

Template Path

The path to the template that this container will repeat.

Scripting name

templatePath

Data type

String

Repeat Behavior

"Count" will repeat the template a number of times, assigning each template an index number."Dataset" will repeat the template once per row in the template parameter's dataset.

Scripting name

repeatBehavior

Data type

int

Values

0

Count

1

Dataset

Repeat Count

The template will be repeated this many times, if the repeat behavior is set to "Count"

Scripting name

repeatCount

Data type

int

Template Parameters

This dataset will be used to control the number of templates and the parameters set on the templates if the repeat behavior is set to "Dataset"

Scripting name

templateParams

Data type

Dataset

Index Parameter Name

A name of an integer parameter on the template that will be set to an index number.

Scripting name

indexParamName

Data type

String

Common

Name

The name of this component.

Scripting name

name

Data type

String

Flags

bindable

Visible

If disabled, the component will be hidden.

Scripting name

visible

Data type

boolean

Flags

bindable

Border

The border surrounding this component. NOTE that the border is unaffected by rotation.

Scripting name

border

Data type

Border

Data

Data Quality

The data quality code for any tag bindings on this component.

Scripting name

dataQuality

Data type

int

Flags

bindable | expert

Scripting

Events

The following event sets are fired by this component. See Component Event Handlers to learn more.

propertyChange

 

Scripting Functions

This component has no special scripting functions.