You are here: Core Reference > Coding > Scripting > Form.AddStaticText

Form.AddStaticText

The AddStaticText function allows the script to add text to a Form. The text can be used to provide instructions, label a field etc.

Syntax

Form.AddStaticText(X, Y, Text)

Description

Displays a Form. The next function in the script is not performed until the Form is closed by a user.

Arguments

X {integer}

Represents the horizontal position of the text on the Form—the position on the 'X-Axis' at which the text begins.

 

Y {integer}

Represents the vertical position of the text on the Form—the position on the 'Y-Axis' at which the text begins.

 

Text {string}

The text that is to be shown on the Form.

Returns

Static Text Control Object

Static Text Control Objects have common Control Object Properties as well as their own specific properties that can be used in the script (see Static Text Properties).

Example:

Set Description = Form.AddStaticText(2,2, "Set the Values for the Pump")

Adds the words 'Set the Value for the Pump' to the Form at the position that corresponds to 2, 2. The control is stored in the Description variable that is defined earlier in the script.


ClearSCADA 2015 R2