UndoRedo: IUndoRedo;
UndoRedo: Prognoz.Platform.Interop.ForeSystem.UndoRedo;
The UndoRedo property determines parameters of the undo/redo stack of chart external legend.
Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.
Sub UserProc;
Var
mb: IMetabase;
rep: IPrxReport;
chartlegend: IChartExternLegend;
objects: ITabObjects;
UnRed: IUndoRedo;
Begin
mb := MetabaseClass.Active;
rep := mb.ItemById("Report").Edit As IPrxReport;
objects := (rep.ActiveSheet As IprxTable).TabSheet.Objects;
chartlegend := objects.Item(1) As IChartExternLegend;
chartlegend.AddChart(objects.Item(2) As ichart);
UnRed:=chartlegend.UndoRedo;
UnRed.Enabled:= True;
UnRed.Limit:= 50;
(rep As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the undo/redo stack is available for the chart external legend with the number of 50 available undo/redo operations.
Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.ForeSystem;
...
Public Sub Main(Params: StartParams);
Var
mb: IMetabase;
rep: IPrxReport;
chartlegend: IChartExternLegend;
objects: ITabObjects;
UnRed: IUndoRedo;
Begin
mb := Params.Metabase;
rep := mb.ItemById["Report"].Edit() As IPrxReport;
objects := (rep.ActiveSheet As IprxTable).TabSheet.Objects;
chartlegend := legend As IChartExternLegend;
chartlegend.AddChart(objects.Item[1] As DxChart);
UnRed:= ((rep.ActiveSheet As ITabSheet).Objects.Item[2] As IPrxChartLegend).UndoRedo;
UnRed.Enabled:= True;
UnRed.Limit:= 50;
(rep As IMetabaseObject).Save();
End Sub;
After executing the example the undo/redo stack is available for the chart external legend with the number of 50 available undo/redo operations.
See also: