DataView.InsertActionMenuItem

Prototypes

void InsertActionMenuItem( String sExistingItem, String sItem, String sCode )

Parameters

String sExistingItem
An existing menu item. The new item will be inserted after the existing item. See the documentation for AppendActionMenuItemToGroup for ways to specify sExistingItem for cascading menus.

String sItem
The new menu item.

String sCode
One or more IMLPlus statements that will be executed when the menu item is invoked. If sCode is an empty string, a separator (a horizontal line) is inserted into the menu.

Remarks

Inserts a new menu item after an existing item on the action menu. See the documentation for AppendActionMenuItem for a general discussion of adding items to the action menu.

The items specified by sExistingItem and sItem must be on the same menu.

There are special techniques for specifying certain menu positions:

Example
declare ScatterPlot plot;
plot = ScatterPlot.Create( "Action Menu", 1:10, 1:10 );

plot.AppendActionMenuItem( "Item 1",
    "print 'Item 1';" );
plot.AppendActionMenuItem( "Cascade\nItem 2"J,
    "print 'Item 2';" );
plot.AppendActionMenuSeparator( "Cascade\nSep1"J );
plot.AppendActionMenuItem( "Cascade\nItem 3"J,
    "print 'Item 3';" );

plot.InsertActionMenuItem( "Cascade",
    "Item 4", "print 'Item 4';" );
plot.InsertActionMenuItem( "Cascade\n"J,
    "Cascade\nItem 5"J, "print 'Item 5';" );
plot.InsertActionMenuItem( "Cascade\nItem 3"J,
    "Cascade\nItem 6"J, "print 'Item 6';" );
/* Press F11 in the plot window to see the menu. */
See Also

DataView.AppendActionMenuItem
DataView.AppendActionMenuItemToGroup
DataView.InsertActionMenuSeparator