DataView.AppendActionMenuItemToGroup

Prototypes

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

Parameters

String sExistingItem
An existing menu item. The new item will be appended to the end of the group that contains this item.

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 appended to the menu.

Remarks

This method appends a new item to the end of the group that contains an existing action menu item. The group containing the existing item ends either with the first separator after the item or at the end of the menu or submenu. 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:

The valid techniques for specifying sExistingItem are presented in the table below for all methods that refer to an existing menu item. Valid specifications are marked with "Y", while invalid specifications are marked with "N."

  sExistingItem
Method "Cascade\nMenu Item"J "Cascade\n"J "Cascade"
AppendActionMenuItemToGroup Y Y Y
AppendActionMenuSeparatorToGroup Y Y Y
BulletActionMenuItem Y N N
CheckActionMenuItem Y N N
EnableActionMenuItem Y N N
InsertActionMenuItem Y Y Y
InsertActionMenuSeparator Y Y Y
IsExistingActionMenuItem returns true returns false returns true
RemoveActionMenuItem Y N N
ReplaceActionMenuItem Y N N
ReplaceActionMenuItemCode Y N N
ReplaceActionMenuItemText Y N N
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.AppendActionMenuItemToGroup( "Cascade",
    "Item 4", "print 'Item 4';" );
plot.AppendActionMenuItemToGroup( "Cascade\n"J,
    "Cascade\nItem 5"J, "print 'Item 5';" );
plot.AppendActionMenuItemToGroup( "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.AppendActionMenuSeparatorToGroup
DataView.InsertActionMenuItem