ContextMenuNewItem

 

The 'ContextMenuNewItem' function creates the context menu item.

 

object @ContextMenuNewItem(string title, string script);

 

Parameters

string title : Title of menu

string script : Menu script to execute when you click the menu.

 

Return Value

Create the menu item and returns the handle.

 

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()