On Mon, Apr 29, 2013 at 1:34 PM, Jürgen Hestermann
<juergen.hesterm...@gmx.de> wrote:
> 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?

The problem seems related to the fact that TMemo tries to keep an
empty line at end.
Besides de TMemo problem, as far as logging goes you'd better use TSynEdit ;-)

Best regards,
Flávio

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to