FMX TMemo and BeginUpdate

  

How do I prevent a FMX TMemo from updating while loading data into it? Memo1.Lines.BeginUpdate doesn’t seems to be the answer.
Code to reproduce:
Create a new FMX application
Place a TMemo on the form
Add a OnDoubleClickEvent to it
and then the following code:
procedure TForm2.Memo1DblClick(Sender: TObject);
var
i: Integer;
const
Line = ‘1234567890_1234567890_1234567890_1234567890_1234567890_1234567890’;
begin
Memo1.Lines.Clear;
Memo1.ControlType := TControlType.Platform;
Memo1.Lines.BeginUpdate;
for i := 1 to 1000 do
Memo1.Lines.Add(Line);
Memo1.Lines.EndUpdate;
end;

While running the program you’ll see the Memo gets updated while adding data despite the call to BeginUpdate / EndUpdate

Comments are closed.