[Lazarus] TMemo flicker

shoKwave shokwave at gmx.net
Tue Apr 30 10:02:10 CEST 2013


Am 30.04.2013 07:25, schrieb Jürgen Hestermann:
> Maybe someone can just try my example program.
OK, now I've tested a bit and BeginUpdate/EndUpdate works for me (Win7 
x64, FPC and Laz Trunk):

procedure TForm1.Button1Click(Sender: TObject);
var i:Integer;
begin
   Memo1.Clear;
   for i := 1 to 40 do
   begin
     if odd(i) then
Memo1.Append('\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\')
     else
Memo1.Append('+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++');
   end;

   for i := 1 to 1000 do
   begin
     memo1.Lines.BeginUpdate;
     Memo1.Lines[Memo1.Lines.Count-1] := '#### LAST LINE 
---'+IntToStr(i)+'-----------------------------------------------------------';
     memo1.Lines.EndUpdate;
     Application.Processmessages;
   end;
   Memo1.Lines[memo1.Lines.Count-1] := '#### READY #### ';
end;

--
regards
Ingo





More information about the Lazarus mailing list