DialogAddTextEditor Function

Help Contents

Introduction

Adds a Text Editor to the current dialog.

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 Text Editor is initialized with the value of the program variable when the dialog is opened.
  • The contents of the Text Editor is written to the program variable when the dialog is closed.

Return Value

None.

Examples

  1. Use DialogAddTextEditor() to add a multi-line text to the current dialog:
    VAR Comment : WSTRING; Result : INT; END_VAR
    
    DialogNew();
    DialogAddTextEditor( "Enter Comment", 3, 32, Comment );
    Result := DialogOpen( "Comment Dialog", 1 );
    IF Result = 1 THEN
        (* The OK button was pressed *)
    END_IF
    

    Notes:

    The above code opens the following dialog:

    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.