IGxFlowDocument.LoadFormattedText

Syntax

LoadFormattedText:(Text: String);

Parameters

Text. String is in the RTF format.

Description

The LoadFormattedText method loads the string to the formatted text field.

Fore Example

Executing the example requires:

Add links to the Report, Tab, Drawing, Forms, Metabase, Forms.Net (for the Fore.NET example) system assemblies. Add the button event:

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Rep: IPrxReport;
    Doc: IPrxFlowDocument;
    Text: String;
    Rect: IGxRectF;
    Obj: ITabObject;
    Objs: ITabObjects;
    TS: ITabSheet;
Begin
    Rep := UiReport1.Report;
    // Get current formatted text
    TS := (Rep.ActiveSheet As IPrxTable).TabSheet;
    Objs := TS.Objects;
    Doc := Objs.Item(0).Extension As IPrxFlowDocument;
    Text := Doc.SaveFormattedText;
    Rect := New GxRectF.Create(005050);
    // Create a new formatted text
    Obj := Objs.Add("PrxFlowDocument", Rect);
    Doc := Objs.Item(1).Extension As IPrxFlowDocument;
    Doc.LoadFormattedText(Text);
End Sub Button1OnClick;

After executing the example a copy of formatted text will be created.

Fore.NET Example

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

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Drawing;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Rep: IPrxReport;
    Doc: IPrxFlowDocument;
    Text: String;
    Rect: GxRectF = New GxRectFClass();
    Obj: ITabObject;
    Objs: ITabObjects;
    TS: ITabSheet;
Begin
    Rep := uiReportNet1.ReportUi.Report;
    TS := (Rep.ActiveSheet As IPrxTable).TabSheet;
    Objs := TS.Objects;
    // Get current formatted text
    Doc := Objs.Item[0].Extension As IPrxFlowDocument;
    Text := Doc.SaveFormattedText();
    Rect.Create(005050);
    // Create a new formatted text
    Obj := Objs.Add("PrxFlowDocument", Rect);
    Doc := Objs.Item[1].Extension As IPrxFlowDocument;
    Doc.LoadFormattedText(Text);
End Sub;

See also:

IGxFlowDocument