MenuAddEntry Function

Help Contents

Introduction

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

Syntax

Informal Syntax:

MenuAddEntry( Label, Id )

Formal Syntax:

MenuAddEntry( Label:=Expression, Id:=Expression )

Parameters

ParameterTypeDescription
Text ANY_STRING The text of the menu entry.
Id UDINT The command value associated with the menu entry.

Return Value

None.

Remarks

The function MenuAddEntry() adds a text entry and command value to the current drop-down menu definition.

If the operator, selects this menu entry, the Id parameter will be returned from the MenuOpen Function.

Make sure each entry in the drop-down menu definition has different Id parameter values.

The maximum number of menu entries in 50.

Examples

In the following example, the menu entry "Stop:" is added to the current drop-down menu definition:

MenuAddEntry( "Stop", 1 );

For a more detailed example on how to use the menu functions see the MenuOpen() Function.

Further Information

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.

MenuAddSubMenu() function

To add a submenu 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.