MenuAddSubMenu Function

Help Contents

Introduction

Adds a submenu to the current drop-down menu definition.

Syntax

Informal Syntax:

MenuAddSubMenu( Label )

Formal Syntax:

MenuAddSubMenu( Label:=Expression )

Parameters

ParameterTypeDescription
Text ANY_STRING The text of the submenu entry in the parent menu.

Return Value

None.

Remarks

The function MenuAddSubMenu() adds a submenu to the current drop-down menu definition. The submenu will contain the menu entries added since the last call to MenuNew().

An Operator Action must call MenuNew() at least two times to create a submenu. The first call to MenuNew() creates to the top level menu. The second call to MenuNew() marks the start of the submenu.

The maximum depth of submenus is 2.

Examples

This example shows how to create a menu with two submenus:

(* Start a new top level menu *)
MenuNew();

(* Grains submenu *)
MenuNew();
MenuAddEntry("Wheat", 1);
MenuAddEntry("Oats", 2);
MenuAddEntry("Barley", 3);
MenuAddSubMenu("Grains");

(* Pseudo grains submenu *)
MenuNew();
MenuAddEntry("Buckwheat", 4);
MenuAddEntry("Quinoa", 5);
MenuAddSubMenu("Pseudo Grains");

Result := MenuOpen();

See also the MenuOpen() Function for other menu examples.

Further Information

MenuAddEntry() function

To add a menu entry to the current drop-down menu definition.

MenuAddCheckedEntry() function

To add a menu entry with a check mark to the current drop-down menu definition.

MenuAddSeparator() function

To add a separator to the current drop-down menu definition.

Operator Actions

To learn where you can use this function.

Glossary

For the meaning of terms used in Fernhill SCADA.