[Lazarus] TMemo flicker
K. P.
platysternon at hotmail.com
Mon Apr 29 18:38:17 CEST 2013
Have you tried wrapping your writes in memo1.Lines.BeginUpdate and memo1.Lines.BeginUpdate?
> Date: Mon, 29 Apr 2013 18:34:07 +0200
> From: juergen.hestermann at gmx.de
> To: lazarus at lists.lazarus.freepascal.org
> Subject: [Lazarus] TMemo flicker
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130429/8c02ad11/attachment-0003.html>
More information about the Lazarus
mailing list