RichEdit - Add Text With LineBreak

Hello, 


How do I add a text with line break of a StringList for RichEditor?

Thanks

AddMultiLineText(stringlist.Text);

Ok, this works, but ...

When we have a very long text, e.g. with 12k characters, it is very slow.
Also to navigate the component with the scroll.

Thanks

What exactly is slow?

Is this one single long line? Is the loading slow? The displaying? ...?
Hello,

No, it's a file with multiple lines ..
Below is the code used:

Procedure SetTemplate;
var dt: TDateTime;
begin
   ClientDataSetDESCRICAO.AsString: = GetTemplate ('Select Template From Templates Where ID =' + FId_Template);
   FRichEdit.Clear;
   dt: = Now;
   FRichEdit.AddMultiLineText (ClientDataSetDESCRICAO.AsString);
   ShowMessage (IntToStr (SecondsBetween (Now, dt)));
end;

where:
FRichEdit = TTMSFMXRichEditor;
ClientDataSetDESCRICAO = TBlobField;


Was conducted four tests with the same text, the result was:
90, 92, 87, 97

Text comtém 13.215 characters divided into 150 lines.

Thanks.

Was retested with a default TTMSFMXRichEditor with following code:


var
  i: integer;
  sl: tstringlist;
  t: dword;

begin
  sl := TStringList.Create;

  for i := 0 to 150 do
  begin
    sl.Add('A message has been posted on TMS Software | Product Support Forums that you asked us to keep an eye on.');
  end;

  t := gettickcount;

  caption := inttostr(Length(sl.Text));

  TMSFMXRichEditor1.BeginUpdate;
  TMSFMXRichEditor1.AddMultiLineText(sl.Text);
  TMSFMXRichEditor1.EndUpdate;

  caption := caption + ' time='+inttostr(gettickcount - t);
  sl.Free;
end;

The combined text added is 15k and it loads here in +/- 400ms.

Hello,
Very good.

What was missing for us was the BeginUpdate and EndUpdate.
Thus it became much faster.

Thanks.