Adding a Menu Text Control to a Screen

Navigation:  How to Work with Screens > Adding Menu/Selection Controls to a Screen >

Adding a Menu Text Control to a Screen

Previous pageReturn to chapter overviewNext page

 

Control Purpose

 

This control is used to display a menu with several option buttons that will enable the redirection to the required programs.

If your MCL-Designer V4 subscription includes Speech attributes, it will affect the Menu Text's use - this control will also accept speech input (operator speaking into the device). The called element (screen, routine out or routine) must end with a "Go To: <Exit>" process to ensure the execution flow returns to the screen that includes the Menu Text.

Add a text menu to a screen by dragging a Menu 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.

 

 

For a better understanding of this specific control, create a Menu Text by following the choices/values displayed throughout the images in our step-by-step.

 

 

The "General" tab is open by default.

 

3. In the "Menu Text & Actions" table, each option from the Menu Text can be named and assigned a target location. Additionally, you can attribute a keyboard shortcut key or add an image to each button.

(Ex: "Menu 1", "Menu 2", "Menu 3")

 

4. To name each option, go to the "Text/Variables" column and enter the information directly on each row OR  click the corresponding and select a variable with the intended value.

See Variable Usage.

(Ex: "L", "I", "C")

 

5. If required, attribute a shortcut key in the device's keyboard for each option.

(Ex: "P:Login"; "P:Inventory", "P:Communications")

 

6. Define the target location for each of the control's menus by selecting from the respective drop-down OR  by clicking . See Detail of a window below.

 

When defining a screen or program as a target destination (ex: via a “GoSub” process), you CANNOT use variables to specify the name of that target screen or program. You must select the intended screen or program from the available drop-down/list.

 

Detail of a window

 

This window is an alternative to the drop-down of destinations:

a. Select a destination screen or routine within the same program as this control, in the left table.

b. Specify the target even more by selecting from the table to the right. The available options are a consequence of your choice in the left table.

c. If you want to add other processes to the execution flow instead of defining a target with a "Go To" process, select the "<Action>" option.

d. Finish this operation by clicking .

 

The function of this control is, usually, to send the operator to a particular screen after a "Change" action. That means you need to add a "Go To" process to the action so that, when it is triggered, the workflow is directed to a specific location such as "Exit", "Next Screen", etc. If the target location for the "Change" action is specified here, it will not be necessary to add a "Go To" process in the "Actions" tab.

 

Use the editing icons to the right of the "Menu Text & Actions" table to move the rows up and down and to delete or add more rows.

 

An "Exit" option is recommended in the target screen, to allow the operator to return to the calling screen. This is best achieved by using a Button or a SoftKey.

 

7. If required, define a variable for the "Store Selected Position (Optional) into Variable" option by clicking . See To Select/Create a Variable.

 

8. If required, define the time out (in seconds) in the "Time Out" option.

(Ex: Maintain the default value 0 - there is no time out defined)

 

9. If a time out is established, a target location must also be defined. Select a destination in the "Go To" box from the drop-down or the list. See Detail of a window above.

 

The definition of a time out will affect the screen which contains the Menu Text. If there is no activity in that screen after the time out, the target location that is determined in the "Go To" option will automatically be called.

 

 

10. Go to the "Layout" tab.

 

 

11. Define the control's style by selecting an option available in the drop-down OR  by clicking . See Editing and Creating Styles and Editing and Creating the Menu Text Style.

(Ex: Normal)

 

12. Position the text/value, within the control, with the alignment buttons.

(Ex: Alignment to the left)

 

13. 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

 

 

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

(Ex: "Menu_Text_1".)

 

15. Consider whether or not to check the following options:

"Enable"

Activates the control's input feature.

"Tab Stop"

Must be checked to enable a "Change Tab Order". This provides the possibility to change the order (between data input controls) in which the information is keyed in by the operator.

"Visible"

Manages the control's visibility in the device's screen.

(Ex: All options checked.)

 

16. Define the "Input List Layout":

"Default Position

Defines the row that is highlighted. (Ex: 1)

"Scrolling"

When checked, this option allows for an up/down navigation of the list.

"Rolling"

When checked, this option will allow for a loop navigation of the list.

(Ex: "Scrolling" option checked.)

 

17. If the "Go To" option in the "General" tab was left unfilled, continue to step 19.

 

18. If the target location for the "Go To" process has already been defined, end the addition of a Menu Text operation by clicking . If the "Go To" option in the "General" tab was left unfilled, continue to step 19.

 

 

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 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.

 

 

Speech Feature

If your MCL-Designer V4 subscription includes Speech attributes, you will have access to an extra tab - "Speech"- where you can define this control's speech possibilities.

 

 

All speech related options within this control are explained in another topic - see Speech in the Menu Text Control. Once you have gone through the topic, use the provided link to return to this step-by-step and continue to the "Actions" tab.

 

If your MCL-Designer V4 license does NOT have Speech attributes, the next tab is the "Actions" tab. Continue to step 19.

 

19. Go to the "Actions" tab.

 

 

Keep in mind there must be an action attached to the control and an objective for that action. This control is an exception because you have to define an objective/target location for each menu included in the Menu Text.

 

By default, the Menu Text already contains a process for each button attached to the "Change" action (exceptionally termed "on Menu #" within this control). The displayed process depends on your choices in the "General" tab.

Ex: The target destinations selected in the "General" tab consisted of programs within your project. Therefore, the default process for each button in the Menu Text is a "Call MCL Program" with the corresponding destination.

 

20. To edit each process included in the Menu Text, double-click the corresponding process OR  right-click the desired process and select "Edit" in the resulting menu. Either of these choices opens the corresponding process window. See Editing Processes.

 

 

21. If required, double-click the empty line below the intended "Menu #" OR  click in the editing bar to add processes to each menu included in the Menu Text. See Adding Processes to a Screen or a Control.

 

 

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

 

 

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

 

 

22. 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. This information is displayed in the "Developer report". See Report.

 

 

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

 

The Menu Text has been successfully added to the screen.

 

When there are only three entries.

When there are too many entries to display on the screen, a vertical scroll bar will, automatically, be displayed to enable the navigation among the listed entries.

 

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

 

 

 

Menu Text's Predefined Local Variables

 

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

 

Action

Change

Variable Name

L_Control_Name

L_Field_Value

L_Line_Number

Variable ID

&0a

&1a

&2a

Description

Stores the control's name (*)

Stores selected field value (**)

Stores selected field number

 

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

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