[Lazarus] TMemo flicker

shoKwave shokwave at gmx.net
Mon Apr 29 19:07:31 CEST 2013


Hi,

you can try

TForm1.FormCreate(Sender:TObject);
begin
   Memo1.DoubleBuffered:=True;
end;


Am 29.04.2013 18:34, schrieb Jürgen Hestermann:
> After having moved from TStringList over TStringGrid (which both 
> cannot be shifted right to make long text visible) I now use TMemo. 
> But again I have another issue with this component: If there are more 
> rows than can be displayed in the window and I change the text in the 
> last row (Lines.Count-1) rapidly then the whole display flickers. This 
> OnClick event demonstrates it:
>
> -------------------------------------------------------
> with Memo1 do
>    begin
>    for i := 1 to 40 do
>       begin
>       if odd(i) then
> Append('\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\') 
>
>       else
> Append('+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'); 
>
>       end;
>    for i := 1 to 1000 do
>       begin
>       Lines[Lines.Count-1] := '#### LAST LINE 
> ---'+IntToStr(i)+'-----------------------------------------------------------';
>       Application.Processmessages;
>       end;
>    Memo1.Lines[Lines.Count-1] := '#### READY #### ';
>    end;
> -------------------------------------------------------
>
> When you click on the memo (so that the routine runs) and the window 
> is small enough then all lines are shifted down for a short time and 
> then are shifted up again when writing to Memo1.Lines[Lines.Count-1]. 
> This flicker is quite disturbing and it does not happen when there are 
> only a few lines (which fit in the window). Is this a known bug?
>
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>





More information about the Lazarus mailing list