void ReplaceActionMenuItemCode( String sExistingItem, String sNewCode )
String sExistingItem
An existing menu item. See the documentation for AppendActionMenuItemToGroup for ways to specify sExistingItem for cascading
menus.
String sNewCode
One or more IMLPlus statements that will be executed when the menu item is invoked.
This method replaces the code associated with an item on the action menu.
You cannot replace a menu separator.
This method is equivalent to calling ReplaceActionMenuItem( sExistingItem, "", sNewCode ).
declare ScatterPlot plot; plot = ScatterPlot.Create( "Action Menu", 1:10, 1:10 ); plot.AppendActionMenuItem( "Item 1", "print 'Item 1';" ); plot.AppendActionMenuItem( "Item 2", "print 'Item 2';" ); plot.ReplaceActionMenuItemCode( "Item 1", "print 'First Item';" ); /* Press F11 in the plot window to see the menu. */
DataView.AppendActionMenuItem
DataView.ReplaceActionMenuItem
DataView.ReplaceActionMenuItemText