Clear canvas and set transparent lazarus / 39-Graphics ---------------------------------------------------------------------- lainz · 2011-04-14 18:10 See the attached picture / Attached 7z file (requires BGRABitmap as installed package). Compile and run lazgui_test. If you go over the 'ToolButton' you will see that is painted. But if you leave the 'ToolButton' area isn't cleared, and text is drawn over the previous drawing. I need to clear the previous drawing and only draw text in a transparent area (to see the background gradient). I tried to use ACanvas.Clear: (lazguiwin7.pas line 60): Code: [Select]if AState = lgNormal then begin     bmp:= TBGRABitmap.Create(ARect.Right,ARect.Bottom);     ACanvas.Clear; // This clear the drawing, but isn't transparent, and used in this way produces flickering end But the background isn't transparent, it is filled with clDefault. ---------------------------------------------------------------------- eny · 2011-04-14 18:45 You are 'abusing' the paintboxes and assume that they work like controls. The easiest fix: repaint all elements of the 'toolbar' when something changes and do it in the right order: first the 'toolbar paintbox' and then all 'button paintboxes'. BTW: case statement