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

Form.AddEditBox

The AddEditBox function allows the script to add a text entry field to the Form. Text entry fields are used when the user needs to manually enter information on the Form

Syntax

Form.AddEditBox(X, Y, Width, Lines)

Description

Adds a text entry field to a Form.

Arguments

X {integer}.

Represents the horizontal position of the field on the Form—the position on the 'X-Axis' at which the field begins. The number represents a percentage of the Form's X coordinate, where 0 is absolute left.

 

Y {integer}

Represents the vertical position of the field on the Form—the position on the 'Y-Axis' at which the field begins. The Y argument is optional. The number represents a percentage of the Form's Y coordinate, where 0 is at the top.

 

Width {integer}

Defines the width of the field.

 

Lines {integer}

Sets the number of lines of text that can be entered into the field. Enter 1 for a single line field, or enter a number higher than 1 for a multi-line field. If a user enters more lines of text than is defined for a multi-line field, scroll bars appear for the field.

Returns

Edit Control Object

Edit Control Objects have common Control Object Properties as well as their own specific functions and properties that can be used in the script—see see Edit Box Functions and see Edit Box Properties.

Example:

Set EnterInfo = Form.AddEditBox(2, 3, 80, 4)


This adds a multi-line text entry field to the Form. The Control Object that is returned by the AddEditBox function is stored as the EnterInfo variable that is defined earlier in the script.

See Also:

Edit Box Functions.


ClearSCADA 2015 R2