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

Martin lazarus at mfriebe.de
Sat Jan 5 13:40:41 CET 2013


On 05/01/2013 11:19, luiz americo pereira camara wrote:
> 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.
> OK.
>
> 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?
>

This would not make sense?

Nothing, except the scrollbars is painted (SynEdit does not paint). If I 
do not call ShowScrollbar, then there are no scrollbars that could be 
painted.




More information about the Lazarus mailing list