Adds a submenu to the current drop-down menu definition.
Informal Syntax:
MenuAddSubMenu( Label )
Formal Syntax:
MenuAddSubMenu( Label:=Expression )
Parameter | Type | Description |
---|---|---|
Text | ANY_STRING | The text of the submenu entry in the parent menu. |
None.
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.
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.
To add a menu entry to the current drop-down menu definition.
MenuAddCheckedEntry() functionTo add a menu entry with a check mark to the current drop-down menu definition.
MenuAddSeparator() functionTo add a separator to the current drop-down menu definition.
To learn where you can use this function.
For the meaning of terms used in Fernhill SCADA.