void ReplaceActionMenuItem( String sExistingItem, String sNewItem, String sNewCode )
String sExistingItem
An existing menu item. The new item will replace the existing item. See the documentation for AppendActionMenuItemToGroup for ways
to specify sExistingItem for cascading menus.
String sNewItem
The new menu item. If this parameter is an empty string, the menu item's text is not changed.
String sNewCode
One or more IMLPlus statements that will be executed when the menu item is invoked. If this parameter is an empty string, the menu item's code is not changed.
This method replaces the text and code associated with an item on the action menu. The items specified by sExistingItem and sNewItem must be on the same menu.
You cannot replace a menu separator.
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.ReplaceActionMenuItem( "Item 1", "First Item", "print 'First Item';" ); /* Press F11 in the plot window to see the menu. */
DataView.AppendActionMenuItem
DataView.ReplaceActionMenuItemCode
DataView.ReplaceActionMenuItemText