[Lazarus] Visual "uglyness" when creating TSynEdit @ runtime in my app

luiz americo pereira camara luizmed at oi.com.br
Sat Jan 5 12:19:55 CET 2013

2013/1/5 Martin <lazarus at mfriebe.de>:
> On 05/01/2013 10:54, luiz americo pereira camara wrote:
>> 2013/1/5 luiz americo pereira camara <luizmed at oi.com.br>:
>>> I've found a suspect.
>>> SetParent triggers the handle creation
>>> TSynEdt.CreateWnd calls SizeOrFontChanged that calls UpdateScrollBars
>>> Here, since PaintLock <> 0 the scrollbar change is postponed
>>> Martin/Bart, can you check if you pass the check for PaintLock in
>>> UpdateScrollBars?
>>> Alternatively comment the call to SizeOrFontChanged in CreateWnd and
>>> see what happens
>> More info:
>> SynEdit.CreateHandle -> DoDecPaintLock -> UpdateScrollBars ->
>> ShowScrollBar (LCL) -> ShowScrollBar (Win32) -> Windows.RedrawWindow
> I don't think it can be avoided.
> I can detect the situation of course, but preventing that call, might lead
> to wrong display results.


What OS are you using.

Here with windows 7 no Paint occurs at all. See previous mail

Can you check (comment ShowScrollBar) if the paint you are seeing is
really from ShowScrollBar?

After that we can look what to do


More information about the Lazarus mailing list