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

MenuNodeAddChild

Dynamically add a new item to the menu at runtime. Be reminded that the changes are for the current session only and will not be persisted to the _Pagemen.RDB file.

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

Syntax

MenuNodeAddChild(hParent, sName, sCommandName [, sCommandArgs] [, sSymbol] [, iOrder])

hParent:

Handle of the parent node to add the new menu item under.

sName:

The string label of the new menu item.

sCommandName:

Specifies the name of the Cicode function to run.

sCommandArgs:

Specifies the parameters of the Cicode function to run.

sSymbol:

The symbol to be associated with the menu item.

iOrder:

The relative position in the menu for new item.

Return Value

The handle of the new node, or -1 if unsuccessful.

Related Functions

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

See Also

Menu Functions Introduction

Menu Functions