Data Bindings

Help Contents

Introduction

You can use data bindings to animate graphics to reflect plant state. A single data binding is a link between a graphic item and a database tag name or expression. When data bound, changes to the value of the tag are reflected by a change in appearance of the graphic item.

For example you could link the color of a pump symbol to a tag that monitors the pump state. When the tag is True the symbol color is green (indicating running). When the tag is False the symbol color is red (indicating stopped).

The graphic editor supports these data bindings:

A boolean value that causes the item to blink.

The item blinks when the value is True. The item does not blink when the value is False.

If not bound, the value defaults to False (blink disabled).

The BlinkSpeed property determines how fast the item blinks (slow, medium or fast). The BlinkMode property defines how the item blinks (On and off, or Alternate Color)

Applies to

Related Graphic Item Functions


DataBindClipHorizontal

A floating point value that clips the item in the horizontal direction.

A value less than or equal to zero clips the entire item. A value greater than or equal to one does not clip the item. Values between zero and one clip the corresponding portion of the item.

If not bound, the value defaults to 1 (not clipped).

The property ClipRegionHorizontal specifies whether the left or right side of the item is clipped.

This data binding can be useful when creating bar charts.

Clipping the right side of an item

Data binding to clip the right side of a bitmap

Different values clipping a bitmap with ClipRegionHorizontal specifying the right side is clipped.

Clipping the left side of an item

Data binding to clip the left side of a bitmap

Different values clipping a bitmap with ClipRegionHorizontal specifying the left side is clipped.

Applies to


DataBindClipVertical

A floating point value that clips the item in the vertical direction.

A value less than or equal to zero clips the entire item. A value greater than or equal to one does not clip the item. Values between zero and one clip the corresponding portion of the item.

If not bound, the value defaults to 1 (not clipped).

The property ClipRegionVertical specifies whether the top or bottom side of the item is clipped.

This data binding can be useful when creating bar charts.

Clipping the top of an item

Data binding to clip the top side of a bitmap

Different values clipping a bitmap with ClipRegionVertical specifying the top side is clipped.

Clipping the bottom of an item

Data binding to clip the bottom side of a bitmap

Different values clipping a bitmap with ClipRegionVertical specifying the bottom side is clipped.

Applies to


DataBindDisableActions

A boolean value that disables actions on the item.

When the data binding is True, all actions on the item are disabled. When the data binding is False, all actions on the item are enabled.

If not bound, the value defaults to False (all actions are enabled).

This data binding can be useful in creating interlocks where the state of one tag can prevent the operator taking actions on other tags.

Applies to

Related Graphic Item Functions


A boolean value that causes the fill part of a shape to blink.

The shape fill blinks when the value is True. The shape fill does not blink when the value is False.

If not bound, the value defaults to False (blink disabled).

The BlinkSpeed property determines how fast the shape fill blinks (slow, medium or fast). The BlinkMode property defines how the shape fill blinks (On and off, or Alternate Color)

Applies to


DataBindFillColor

A value that changes the color of the shape fill.

A numeric value is interpreted as an RGB value. Bits 0 to 7 specify the red value. Bits 8 to 15 specify the green value. Bits 16 to 24 specify the blue value. For example the value 16#FF0000 represents the color Blue.

A string value is interpreted as a named color, for example "Red".

The FillColorDataBoundStops property is a bitmask of which colors on a gradient fill are animated. For example:

Examples of fill color data bindings

Examples of numeric and string fill color bindings.

When used on Group, the color value is propagated to all shapes in the group. If a shape in the group has its own DataBindFillColor data binding, the color value is not propagated to that shape.

Applies to


DataBindFillVisible

A boolean value that shows or hides the fill part of a shape.

The shape fill is drawn when the value is True. The shape fill is not drawn when the value is False.

If not bound, the value defaults to True (shape fill visible).

Applies to


A boolean value that causes the line part of a shape to blink.

The shape line blinks when the value is True. The shape line does not blink when the value is False.

If not bound, the value defaults to False (blink disabled).

The BlinkSpeed property determines how fast the shape line blinks (slow, medium or fast). The BlinkMode property defines how the shape line blinks (On and off, or Alternate Color)

Applies to


DataBindLineColor

A value that changes the color of the shape line.

A numeric value is interpreted as an RGB value. Bits 0 to 7 specify the red value. Bits 8 to 15 specify the green value. Bits 16 to 24 specify the blue value. For example the value 16#FF0000 represents the color Blue.

A string value is interpreted as a named color, for example "Red".

Examples of line color data bindings

Examples of numeric and string line color bindings.

When used on Group, the color value is propagated to all shapes in the group. If a shape in the group has its own DataBindLineColor data binding, the color value is not propagated to that shape.

Applies to


DataBindLineVisible

A boolean value that shows or hides the line part of a shape.

The shape line is drawn when the value is True. The shape line is not drawn when the value is False.

If not bound, the value defaults to True (shape line visible).

Applies to


DataBindOffsetX

A floating point value that moves an item in the horizontal direction.

Positive values move the item to the right. Negative values move the item to the left. Values are in grid units.

If not bound, the value defaults to 0 (no horizontal movement).

Data binding to move a bitmap in the horizontal direction

Applies to


DataBindOffsetY

A floating point value that moves an item in the vertical direction.

Positive values move the item down. Negative values move the item up. Values are in grid units.

If not bound, the value defaults to 0 (no vertical movement).

Data binding to move a bitmap in the vertical direction

Applies to


DataBindRotation

A floating point value that rotates the shape item around its Translation Center Item Transformation Center..

Positive values rotate the shape item clockwise. Negative values rotate the shape anticlockwise. Values are degrees.

Data binding to rotate a bitmap by different angles

If not bound, the value defaults to 0 (no rotation).

Applies to


DataBindRotationSpeed

A floating point value that causes the shape item to rotate continuously around its Translation Center Item Transformation Center..

Positive values rotate the shape item clockwise. Negative values rotate the shape anticlockwise. Values are degrees per second.

If not bound, the value defaults to 0 (no rotation).

Applies to


DataBindScaleX

A floating point value that scales an item in the horizontal direction.

Values greater than 1 makes the item larger. Values less than 1 makes the item smaller. A value of 1 leaves the item the same size.

If not bound, the value defaults to 1 (no scaling).

The Translation Center Item Transformation Center defines origin of the scale operation.

Horizontal scaling relative to the left side of the shape

Data binding to scale a bitmap horizontally (left aligned)

In these examples, the translation center is at the left edge of the shape.

Applies to


DataBindScaleY

A floating point value that scales an item in the vertical direction.

Values greater than 1 makes the item larger. Values less than 1 makes the item smaller. A value of 1 leaves the item the same size.

If not bound, the value defaults to 1 (no scaling).

The Translation Center Item Transformation Center defines origin of the scale operation.

Vertical scaling relative to the bottom of the shape

Data binding to scale a bitmap vertically (bottom aligned)

In these examples, the translation center is at the bottom edge of the shape.

Vertical scaling relative to the top of the shape

Data binding to scale a bitmap vertically (top aligned)

In these examples, the translation center is at the top edge of the shape.

Applies to


DataBindText

A string value that specifies the text string to display.

Non-string values, for example INT or BOOL, are converted to text before display.

If not bound, the text item displays the value of the Text property.

Examples of text data bindings

Examples of numeric and string text bindings.

When used on a Group, the text value is propagated to all text items in the group. If a text item in the group has its own DataBindText data binding, the text value is not propagated to that text item.

Applies to

Related Graphic Item Functions


DataBindTextColor

A value that changes the color of the text.

A numeric value is interpreted as an RGB value. Bits 0 to 7 specify the red value. Bits 8 to 15 specify the green value. Bits 16 to 24 specify the blue value. For example the value 16#FF0000 represents the color Blue.

A string value is interpreted as a named color, for example "Red".

Examples of text color data bindings

Examples of numeric and string text color bindings.

When used on Group, the color value is propagated to all text items in the group. If a text item in the group has its own DataBindTextColor data binding, the color value is not propagated to that shape.

Applies to


DataBindTextStrikeout

A boolean value that draws a strikeout line through text.

A strikeout line is drawn through the text when the value is True. When the value False, no strikeout line is drawn.

If not bound, the TextStrikeout property controls whether a strikeout line is drawn.

Examples of text strikeout data bindings

Examples text strikeout data bindings.

Applies to


DataBindTextUnderline

A boolean value that draws an underline below the text.

An underline is drawn below the text when the value is True. When the value False, no underline is drawn.

If not bound, the TextUnderline property controls whether an underline is drawn.

Examples of text underline data bindings

Examples text underline data bindings.

Applies to


DataBindTooltip

A string value that specifies the tooltip to display when the cursor hovers over the item.

Non-string values, for example INT or BOOL, are converted to text before display.

If not bound, no tooltip is displayed.

Applies to

Related Graphic Item Functions


DataBindVisible

A boolean value that shows or hides the item.

The item is drawn when the value is True. The item is not drawn when the value is False.

If not bound, the value defaults to True (item visible).

Applies to

Related Graphic Item Functions


Further Information

Data Bindings Editor

For how to edit data bindings for items on graphic pages.

Graphic Editor Toolbar

For the different tools available to edit graphic pages.

Graphic Editor

For information about editing graphic pages in Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.