Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

FormEdit

  • Last UpdatedMar 31, 2025
  • 2 minute read

Adds an edit field to the current form. You should call this function only after the FormNew function and before the FormRead function. A user input/edit box is added to the form at the specified column and row position. The operator can enter or edit the text in the edit box. This text is then passed to this function as Text.

Syntax

FormEdit(Col, Row, Text, Width[, maxTextLength][, Height][, bReadOnly])

Col:

The number of the column in which the edit field will be placed. Enter a number from 0 (column 1) to the form width - 1. For example, to place the edit field in column 8, enter 7.

Row:

The number of the row in which the edit field will be placed. Enter a number from 0 (row 1) to the form height - 1. For example, to place the edit field in row 6, enter 5.

Text:

Variable containing the text in the edit field. Text initially contains the default text (if any) for the operator to edit. When the function closes, this argument is passed back with the operator's input.

Width:

The width of the edit field.

maxTextLength:

This optional parameter specifies the maximum length of input text. The default value is 0 meaning the string can have the maximum length allowed in the system (Cicode allows strings of 255 characters).

Height:

The height of the edit field as measured using average character height. When value specified is less than 1 or not specified, it is default to 1 (single line). When multiple lines are specified, the content of the edit box will be word wrapped.

bReadOnly:

Flag to indicate whether the edit box is read only. Default is FALSE if not specified.

Return Value

The field handle if the string is successfully added, otherwise -1 is returned.

FormNew, FormRead

Example

STRING Recipe;
FormNew("Recipe",5,30,0);
! Add edit field, default Recipe to "Jam".
Recipe="Jam";
FormEdit(1,2,Recipe,20);
! Read the form.
FormRead(0);
! Recipe will now contain the operator-entered data.

See Also

Form Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in