RichEdit.Lines.Text

Since I use Delphi XE2 RichEdit.Lines.Text dosn't work.

I do this:

Child.Visible := Trim(RichEdit.Lines.Text) > '';

RichEdit.Lines.Text is always empty, although the Text is printing on the Report.

I want to determine if the Richedit is empty.
How can I do that?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:08AM
    try working in the oad event
    sample of stripping white space
    stripwhitespace from rich edit
    procedure Rich1OnAfterData(Sender: TfrxComponent);
    var
    i: Integer;
    s: String;
    begin
    i := Rich1.RichEdit.Lines.Count - 1;
    while i >= 0 do
    begin
    s := Rich1.RichEdit.Lines;
    if Trim(s) = '' then
    Rich1.RichEdit.Lines.Delete(i)
    else
    break;
    Dec(i);
    end;
    end;

Leave a Comment