[Lazarus] TMemo flicker

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed May 1 13:45:31 CEST 2013



José Mejuto schrieb:
> El 01/05/2013 12:16, Jürgen Hestermann escribió:
> 
>> Yes, if the *programmer* does multiple things to a GUI component. But
>> here it was only a single assignment which should not require
>> Begin/EndUpdate but this assignment seems to cause multiple things
>> internally which make it flicker .
>>
> 
> Hello,
> 
> Before looking inside the LCL code the effect could be explained as 
> TMemo text property is completly erased and rewritten each time 
> something change in the text, so when the last line is changed, 
> internally the whole content is erased and replaced by the new one. When 
> the OS component receives the new text it seems to send some messages to 
> itself to adjust scrollbars (which begin/end update will block), the 
> first one remove scrollbars, the next one fill the text, as the text is 
> larger than visible part scrollbar goes to the bottom (this will not 
> happend with begin/end update).
> 
> The strange thing is that this behavior should produce high CPU usage 
> but not a up/down one line effect, so something is wrong either in LCL 
> or in the Memo Windows control.

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.

DoDi





More information about the Lazarus mailing list