void EnableActionMenuItem( String sExistingItem <, boolean bEnable> )
String sExistingItem
An existing menu item. See the documentation for AppendActionMenuItemToGroup for ways to specify sExistingItem for cascading
menus.
boolean bEnable
If bEnable is false, the specified menu item is disabled. If bEnable is true, the item is enabled. Calling this method without specifying the bEnable
parameter is equivalent to calling it with bEnable equal to true.
This method enables or disables an item on the action menu. A disabled menu item is displayed in gray and cannot be invoked.
You cannot disable a cascading menu item.
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.EnableActionMenuItem( "Item 2", false ); /* Press F11 in the plot window to see the menu. */