Visualization Element: Text Editor
Symbol:

Category: Special Controls
The element shows the contents of text files that are saved on the controller. Files can be encoded in ASCII or Unicode formats. A visualization user can also edit the text.
Element properties
Are all element properties available?
All properties are available only after you select the Advanced option or the All categories filter in Properties.
Element name | Example: TipAssign individual names for elements so that they are found faster in the element list. |
Element Type | Text Editor |
Position
The position defines the location and size of the element in the visualization window. This is based on the Cartesian coordinate system. The origin is located in the upper left corner of the window. The positive horizontal X-axis runs to the right. The positive vertical Y-axis runs downwards.
X | The X-coordinate (in pixels) of the upper left corner of the element Example: |
Y | The Y-coordinate (in pixels) of the upper left corner of the element Example: |
Width | Specified in pixels Example: |
Height | Specified in pixels Example: |
Tip
You can also change the values by dragging the box symbols to other positions in the editor.
Font
Font name | Non-proportional font used by the visualization to display the contents of the file Example: Courier New |
Size | Font size Example: |
Control variables
File | |
Variable | Variable ( It is located in the file system of the controller. Example: |
Open | Variable Example:
In case another file is still open, then it is closed by setting the close variable ( In a cycle, the open call is processed first and then the close call. When the triggering control variables are set simultaneously, the file is first opened and then immediately closed afterwards. As soon as the Open or New flag is set, this action is executed during the next visualization cycle and the existing file name is evaluated. Both flags are evaluated in the same cycle and can therefore be set simultaneously. |
Close | Variable ( Example:
Note: In a cycle, the open call is processed first and then the close call. When the triggering control variables are set simultaneously, the file is first opened and then immediately closed afterwards. |
Save | Variable ( Example:
|
New | Variable ( Example:
As soon as the Open or New flag is set, these actions are executed during the next visualization cycle and the existing file name is evaluated. Both flags are evaluated in the same cycle and can therefore be set simultaneously. |
Edit | |
Variable | Variable ( Example: |
Find | Variable ( Example:
|
Find next | Variable ( Example:
|
Caret position | |
Line | Variable (integer data type) for the caret line Example: |
Column | Variable (integer data type) for the caret column Example: |
Position | Output variable (integer data type) for the output of the absolute position of the caret in the text Example: |
Set cursor | Variable Example:
Note: The variable is used as the control variable for an input event triggered by a visualization user. |
Selection | |
Start position | Output variable (integer data type) for the output of the absolute position where the text selection starts Example: |
End position | Output variable (integer data type) for the output of the absolute position where the text selection ends Example: |
Start line number | Output variable (integer data type) for the output of the line where the text selection begins Example: |
Start column index | Output variable (integer data type) for the output of the column where the text selection begins Example: |
End line number | Output variable (integer data type) for the output of the line where the text selection ends Example: |
End column index | Output variable (integer data type) for the output of the column where the text selection ends Example: |
Line to select | Variable (integer data type) for the line number which is selected Note: The selection is controlled by the variables in the Trigger selection property. |
Set selection | Variable ( Example:
If the line is not in the current text segment of the text editor, then the text segment is moved to this line. NoteThe variable is used as the control variable for an input event triggered by a visualization user. The control variable is not reset automatically. You are responsible for this to occur in the visualization. |
Error handling | |
Variable for error code | Variable (integer data type) for the error number in case of error Example: The error codes are declared in |
Variable for content changed | Variable ( Example:
|
Variable for access mode | Variable ( Example:
NoteThe variable overwrites the setting in the Editor mode property. |
Maximum line length
Maximum line length | Maximum number of characters per line |
Editor mode |
|
New files
Character encoding | . Character encoding of the new file:
|
New line character sequence | . End of line character of the new file:
NoteWhen the visualization user opens an existing file, the end-of-line character of the file is detected and used automatically. |
Center
The properties contain fixed values for the coordinates of the point of rotation. The rotation point is displayed in the editor as the TipYou can also change the values by dragging the | |
X | X-coordinate of the point of rotation |
Y | Y-coordinate of the point of rotation |
Absolute movement
The properties contain IEC variables for controlling the position of the element dynamically. The reference point is the upper left corner of the element. At runtime, the entire element is moved.
Movement | ||
X |
Increasing this value at runtime moves the element to the right. | |
Y |
Increasing this value at runtime moves the element downwards. | |
Rotation | Variable (numeric data type) for the angle of rotation (in degrees) Example: The midpoint of the element rotates at the Center point. This rotation point is shown as the At runtime, the alignment of the element remains the same with respect to the coordinate system of the visualization. Increasing the value rotates the element to the right. | ![]() |
Scaling | Variable (integer data type) to trigger a centric stretching Example: The reference point is the Center property. The value | |
Interior rotation | Variable (numeric data type) for the angle of rotation (in degrees) Example: At runtime, the element rotates about the point of rotation specified in Center according to the value of the variable. In addition, the alignment of the element rotates according to the coordinate system of the visualization. Increasing the value in the code rotates clockwise. The rotation point is shown as the NoteIf a static angle of rotation is specified in the property, then the static angle of rotation is added to the variable angle of rotation (offset) when the visualization is executed. | ![]() |
Tip
You can combine the variables to a Unit conversion.
Tip
The X, Y, Rotation, and Interior rotation properties are supported by the "Client Animation" functionality.
State variables
The variables control the element behavior dynamically.
Invisible | Variable (
|
Tip
The Invisible property is supported by the "Client Animation" functionality.
Animation
Tip
These properties are available only when you have selected the Support client animations and overlay of native elements option in the Visualization Manager.
Animation duration | Variable for the duration (in milliseconds) in which the element runs an animation
. Animatable properties
The animated movement is executed when at least one value of an animatable property has changed. The movement then executed is not jerky, but is smooth within the specified animation duration. The visualization element travels to the specified position while rotating dynamically. The transitions are smooth. |
Move to foreground | Variable (
Example: |
Access Rights
Note
Available only when a user management is set up for visualization.
Access Rights button | Opens the Access Rights dialog. There you can edit the access privileges for the element. . Status messages:
|