[Lazarus] TMemo flicker

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed May 1 15:59:46 CEST 2013

José Mejuto schrieb:
> El 01/05/2013 13:45, Hans-Peter Diettrich escribió:
>> Unlike a ListBox, a Memo has a current character position. When that
>> position is not set properly, the "current" line may change with every
>> update.
> Hello,
> I know, but the problem seems to be located in the Windows Memo, after a 
> few tests it behaves different if WM_SETREDRAW is involved and the back 
> and forth for the text happends because to add text the code must select 
> a line (or a new empty line to add new text) and replace it. This 
> replace effect removes the line, adjusts the memo and then replace its 
> position with the new line and add a carriage return and adjust again 
> the memo. So lines goes up and down for each new line added.
>  From my point of view this is a Windows memo bug.

Using Memo.Lines should work better, if possible at all. It should split 
the text into lines, update the lines, then pass the new text back to 
the memo.


More information about the Lazarus mailing list