DialogAddTextEditor Function

Help Contents

Introduction

Adds a text editor to the current dialog, where the field is mapped to a string program variable.

Syntax

Informal Syntax:

DialogAddTextEditor( Prompt, Rows, Columns, Target )

Formal Syntax:

DialogOpen( Prompt:=Expression, Rows:=Expression, Columns:=Expression, Target:=Variable Reference )

Parameters

ParameterTypeDescription
Prompt ANY_STRING The prompt string associated with the text editor field.
Rows ANY_INT The number of rows to display in the text entry field.
Columns ANY_INT The approximate number of columns to display in the text entry field.
Target REF_TO ANY_STRING A reference to a string program variable:
  • The field is initialized with the value of the program variable when the dialog is opened.
  • The value of the field is written to the program variable when the OK button is pressed.

Return Value

None.

Example

The following example shows how to use the DialogAddTextEditor() function:

VAR Comment : WSTRING; END_VAR

DialogNew();
DialogAddTextEditor( "Enter Comment", 3, 32, Comment );
DialogOpen( "Comment Dialog", 1 );

Notes:

The following image shows the dialog displayed by the preceding code example:

Text editor dialog

Further Information

Operator Actions

To learn where you can use this function.

Glossary

For the meaning of terms used in Fernhill SCADA.