IPrxFlowDocument.UndoRedo

Fore Syntax

UndoRedo: IUndoRedo;

Fore.NET Syntax

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

Description

The UndoRedo property determines parameters of Undo/Redo stack for the Formatted Text regular report object.

Fore Example

Executing the example requires a text block in the regular report with the REGULAR_REPORT identifier. Add links to the Metabase, Report, Tab, ForeSystem (for Fore.NET example) system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    DUnRed: IUndoRedo;
    TS: ITabSheet;
    FlowDocument: IPrxFlowDocument;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("REGULAR_REPORT").Edit;
    Report := MObj As IPrxReport;
    TS := (Report.ActiveSheet As IPrxTable).TabSheet;
    FlowDocument := TS.Objects.Item(0).Extension As IPrxFlowDocument;
    DUnRed := FlowDocument.UndoRedo;
    DUnRed.Enabled := True;
    DUnRed.Limit := 3;
    MObj.Save;
End Sub UserProc;

After executing the example the undo/redo stack is available for the text block, the maximum number of undo/redo operations is limited to 3.

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.Report;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    DUnRed: IUndoRedo;
    TS: ITabSheet;
    FlowDocument: IPrxFlowDocument;
Begin
    MB := Params.Metabase;
    MObj := MB.ItemById["REGULAR_REPORT"].Edit();
    Report := MObj As IPrxReport;
    TS := (Report.ActiveSheet As IPrxTable).TabSheet;
    FlowDocument := TS.Objects.Item[0].Extension As IPrxFlowDocument;
    DUnRed := FlowDocument.UndoRedo;
    DUnRed.Enabled := True;
    DUnRed.Limit := 3;
    MObj.Save();
End Sub;

See also:

IPrxFlowDocument