Adding a Display Text Control to a Screen

Navigation:  How to Work with Screens > Adding Display Controls to a Screen >

Adding a Display Text Control to a Screen

Previous pageReturn to chapter overviewNext page

 

Control Purpose

 

This control is used to display text (alphanumeric values) or a variable content on a screen.

 

Add text to a screen by dragging a Display Text control from the top section of the "Control" tab OR  the Style Preview section onto the screen.

 

Step-by-step

 

1. Drag the control onto the screen:

 

If dragged from the "Control" tab, the control will assume the default style. (See Set Default.)

 

If dragged from the Style Preview section, it will assume that particular style.

 

2. Now, double-click the selected control on the screen OR  the tree view to open the properties window.

 

 

The "General" tab is open by default.

 

3. In the "Text Data" option, add/edit the text that will appear on the device's screen.

Either enter text OR  click and select a variable with that value. See Variable Usage.

 

4. Check the "Auto refresh on data change" option to enable an automatic update of the visible information. In other words, whenever the data within a variable is modified, the variable being displayed on screen is automatically updated.

 

5. Go to the "Layout" tab.

 

 

6. Define the control's style by selecting it from the drop-down OR  by clicking . See Editing and Creating Styles and Editing and Creating the Display Text Style.

 

7. Position the text within the control with the alignment buttons.

 

8. Use the button to define if the text is meant to be displayed in a single or in multiple lines. Click the button to the intended state:

If selected ( ), the control's text can be displayed within multiple lines.

If deselect ( ), the text will ONLY be displayed within a single line.

 

9. Maintain the given values or specify the control's position/size, within the screen, by providing the "X" and "Y" coordinates as well as "Width" and "Height".

 

Detail of Position/Size values

 

 

10. In the "Control Settings" section, attribute a name to the control. This name is displayed in the tree view.

 

11. Check the "Visible" option to ensure it is displayed on the device's screen.

 

12. Check the "Enable" option to activate any actions added to the "Actions" tab.

 

13. If the project requires an action to be executed after the control is displayed, such as "go to the next screen", continue to step 14.

If not, end the addition of a Display Text by clicking to apply all of the chosen options in both tabs ("General" and "Layout").

 

 

Use the right-click in MCL-Designer's input boxes to access some related options as well as the general "Cut"; "Copy"; "Paste"; "Search"actions (active/inactive according to the current context).

Ex: If you right-click the "Text Data" input box (included in a Display Text's properties window), you are provided with the general editing/search actions and other specific options such as "Variable Select" (see "Variable Select") ;"Variable Insert" (see "Variable Insert"), "Insert Special Character" (see To Insert Special Characters into a Control's Text Input Field) and "Localization Select" (see Localization List).

If you right-click any other input box, it may provide other possibilities.

 

 

14. Click the "Actions" tab.

 

 

Default action: "Click" - Is triggered when the operator clicks the Display Text control.

 

 

There is always a default action contained in a control (ex: "Click"; "Timer"; "Change"; etc.). In this case, the default action is "Click". A process (usually a "Go to" process) must be added to be executed upon the "Click" action. If there is no process attached to the default action, the flow will NOT proceed.

 

15. If required, double-click the empty line below the action OR  click in the editing bar to add a process to the action. See Adding Processes to a Screen or a Control.

 

This control has predefined local variables (only available in an "action" context). See Display Text's Predefined Local Variables.

 

 

Before concluding the addition operation, check the following:

 

Remember that the "Enable" option (located in the "Layout" tab) must be checked so that the added processes run.

 

 

16. If required, use the icons located on the upper right corner of the properties window:

 

Click this icon to open a "Localization" window where you can edit the text element within that control or add translations to it. See Localization.

 

Click this icon to attach any relevant notes to this control. Enter your text in the resulting window. The entered information is displayed in the "Developer report". See Report.

 

 

17. Click in the "Actions" tab to apply the choices made.

 

The Display Text control has been successfully added to the screen.

 

 

 

To activate an instant edit mode of the text included in the Display Text, select it and press the "<space>" key. When you are done editing the control's text element, press "<Enter>" or click outside the control's area to set it back to view mode.

 

If any subsequent edition of the control's properties is required, double-click the Display Text OR  select "Edit" (in its right-click menu) to open the properties window.

 

 

 

Display Text's Predefined Local Variables

 

This control has predefined Local variables (only available in an "action" context).

 

Action

Click

Variable Name

L_Control_Name

Variable ID

&0a

Description

Stores the control's name (*)

 

* Defined in the control's properties window ("Layout" tab).