UndoRedo: IUndoRedo;
The UndoRedo property determines parameters of the undo/redo stack in the chart.
Executing the example requires a chart in a regular report with the REGULAR_REPORT identifier.
Add links to the Metabase, Chart, Report and Tab system assemblies.
Sub UserProc;
Var
Report: IPrxReport;
Sheet: IPrxSheet;
PrxTable: IPrxTable;
TabSheet: ITabSheet;
Chart: IChart;
MB: IMetabase;
UndoRedo: IUndoRedo;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get chart in regular report
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Sheet := Report.Sheets.Item(0);
PrxTable := Sheet As IPrxTable;
TabSheet := PrxTable.TabSheet;
Chart := TabSheet.Objects.Item(0).Extension As IChart;
// Get undo/redo stack of chart
UndoRedo := Chart.UndoRedo;
// Set availability and number of stack changes
UndoRedo.Enabled:= True;
UndoRedo.Limit:= 5;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the undo/redo stack is available for the chart; the number of available undo/redo operations is set to 5 operations.
See also: