Paint without erasing background on Qt lazarus / 31-LCL ---------------------------------------------------------------------- Blaazen · 2011-07-13 20:49 QT. How to repiant only a part of component or Paint without erasing background. Problem discused on the bugtracker: http://bugs.freepascal.org/view.php?id=19721 but is already closed. @Flávio:  I guess you mean repainting/invalidating the only a relevant part of the control when changing some of its properties, right? Exactly. But I think I cannot use InvalidateRect because it also requires Canvas.Handle (I made this error also in attached my test- project). As Zeljan mentioned above, handle is unavailable outside Paint in QT. Maybe WMEraseBkgnd will do the job but I don't know how to work with it. If I simply add this method (empty) to my project, it makes no change. Thanks. ---------------------------------------------------------------------- felipemdc · 2011-07-17 06:27 Why do you want to do that? If you want to have a transparent control, there is only one way for TCustomControl descendents at the moment with Lazarus: Set a transparent region to it. You can have a transparent control if it descends from TGraphicControl (no handle), on the other hand. See here: http://wiki.lazarus.freepascal.org/LCL_Tips#Creating_a_non- rectangular_window_or_control