Cicode Programming Reference > Cicode Function Categories > Menu Functions Introduction > MenuNodeSetHiddenWhen


Set the HiddenWhen expression for a newly added node. Be aware this function only works for menu nodes added with MenuNodeAddChild(). The HiddenWhen 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.


MenuNodeSetHiddenWhen(hNode, sHiddenWhenName [, sHiddenWhenArgs])


Handle of node to run command.


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


Cicode parameters for HiddenWhen expression. Only supports static arguments.

Return Value

CT_ERROR_NO_ERROR (0) on success, CT_ERROR_BAD_HANDLE (269) if hNode does not refer to a valid node, or CT_ERROR_INVALID_ARG (274) if HiddenWhen Cicode has already been set or is not a valid expression.

Related Functions

MenuGetChild, MenuGetFirstChild, MenuGetGenericNode, MenuGetNextChild, MenuGetPageNode, MenuGetParent, MenuGetPrevChild, MenuGetWindowNode, MenuNodeAddChild, MenuNodeGetProperty, MenuNodeHasCommand, MenuNodeIsDisabled, MenuNodeIsHidden, MenuNodeRemove, MenuNodeRunCommand, MenuNodeSetDisabledWhen, MenuNodeSetProperty, MenuReload


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

See Also

Menu Functions Introduction

Menu Functions