IChart.UndoRedo

Fore Syntax

UndoRedo: IUndoRedo;

Fore.NET Syntax

UndoRedo: Prognoz.Platform.Interop.ForeSystem.IUndoRedo;

Description

The UndoRedo property determines parameters of the undo/redo stack in the chart.

Fore Example

Executing the example requires a chart in a regular report with the REGULAR_REPORT identifier.

Add links to the Metabase, Chart, Report, Tab, ForeSystem (for the Fore.NET example) 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

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 Shared Sub Main(Params: StartParams);
Var
    Report: IPrxReport;
    Sheet: IPrxSheet;
    PrxTable: IPrxTable;
    TabSheet: ITabSheet;
    Chart: IChart;
    MB: IMetabase;
    UndoRedo: IUndoRedo;
Begin
    
// Get repository
    MB := Params.Metabase;
    
// 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;

See also:

IChart