ContextMenuAddItem

 

The 'ContextMenuAddItem' function adds the menu item to the context menu.

 

void @ContextMenuAddItem(object context, object menuitem);

 

Parameters

object context : Handle of context menu which is created by ContextMenuNew function.

object menuitem : Handle of menu item which is created by ContextMenuNewItem function.

 

Return Value

None

 

Example

context = @ContextMenuNew();
item1 = @ContextMenuNewItem("Hello999", "MENU_SCRIPT_999");
@ContextMenuAddItem(context, item1);
item1 = @ContextMenuNewItem("Hello998", "MENU_SCRIPT_998");
@ContextMenuAddItem(context, item1);

item1 = @ContextMenuNewItem("Hello997", "");
@ContextMenuAddItem(context, item1);
item2 = @ContextMenuNewItem("Hello996", "MENU_SCRIPT_998");
@ContextMenuAddSubItem(item1, item2);

@ContextMenuShow(context, 10, 10);

 

Description : It creates the default menu of Hello999, Hello998 and Hello997, and creates the context menu which Hello996 menu added below Hello997.

 

Version Information

Supported Version : 10.2.5 or higher

 

Relate items)

@ContextMenuAddItem()

@ContextMenuAddSubItem()

@ContextMenuNew()

@ContextMenuNewItem()

@ContextMenuShow()