[Lazarus] Repainting of TWinControl children

Vojtěch Čihák vojtech.cihak at atlas.cz
Wed May 6 20:36:24 CEST 2020


AFAIK with TCustomControl you obtain just Resize and then Paint.
Paint is preceded by WMPaint. You should move your code to one of these methods.
 
Vojtěch a.k.a. Blaazen
 
______________________________________________________________
> Od: "Martin Grajcar via lazarus" <lazarus at lists.lazarus-ide.org>
> Komu: "Lazarus mailing list" <lazarus at lists.lazarus-ide.org>
> Datum: 04.05.2020 17:33
> Předmět: [Lazarus] Repainting of TWinControl children
>
In a large project I found out that after on resizing of the form, some components get properly resized but don't receive an Invalidate call. I guess, it's caused by the test in lcl/include/control.inc

  if not ((csLoading in ComponentState) or (Self is TWinControl)) then
    InvalidateControl(IsControlVisible, False, true);Our component extends TCustomControl, so it doesn't get invalidated. I guess, such components are supposed to use a different mechanism, but I can't see how? Can someone point me to the right doc.
 
 ----------
 
 -- 
 _______________________________________________
 lazarus mailing list
 lazarus at lists.lazarus-ide.org
 https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200506/994ed89d/attachment.html>


More information about the lazarus mailing list