Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

MenuNodeSetDisabledWhen

  • Last UpdatedJul 18, 2023
  • 1 minute read

Set the DisabledWhen expression for a newly added node. Be aware this function only works for menu nodes added with MenuNodeAddChild(). The DisabledWhen expression may only be set once for a node.

Be reminded that changes made to the menu tree will not be persisted back to the menu configuration database.

Syntax

MenuNodeSetDisabledWhen(hNode, sDisabledWhenName [, sDisabledWhenArgs] [, iDisabledStyle])

hNode:

Handle of node to run command

sDisabledWhenName:

Cicode function for DisabledWhen expression. The function needs to return an INT.

sDisabledWhenArgs:

Cicode parameters for DisabledWhen expression. Only supports static arguments.

iDisabledStyle:

Disabled Style. Allows different display styles for a disabled menu item.

Return Value

No Error(0) on success, Bad handle specified (269) if hNode does not refer to a valid node, Invalid argument passed (274) if DisabledWhen Cicode has already been set or is not a valid expression.

MenuGetChild, MenuGetFirstChild, MenuGetGenericNode, MenuGetNextChild, MenuGetPageNode, MenuGetParent, MenuGetPrevChild, MenuGetWindowNode, MenuNodeAddChild, MenuNodeGetCurr, MenuNodeGetDepth, MenuNodeGetExpanded, MenuNodeGetProperty, MenuNodeGetTargetPage, MenuNodeHasCommand, MenuNodeIsDisabled, MenuNodeIsHidden, MenuNodeRemove, MenuNodeRunCommand, MenuNodeSetHiddenWhen, MenuNodeSetProperty, MenuReload

Example

INT hNode = MenuNodeAddChild((hParent, "LogIn", "LogIn");
INT Error = MenuNodeSetDisabledWhen(hNode, "UserInfo", "0", 1);

See Also

Menu Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in