TGraphicControl hides TWinControl in design time lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- caleb9 · 2011-07-04 09:15 Hi, I have the following problem: my custom TGraphicControls hide buttons, panels etc. (seamingly all TWinControl descendants) ONLY in design time on Mac OS X. Here's the source code of the control: Code: [Select]unit Background; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs; type   TBackground = class(TGraphicControl)   protected     procedure Paint; override;   end; procedure Register; implementation { TBackground } procedure TBackground.Paint; begin   with Canvas do   begin     Brush.Color := clBlack;     Rectangle(0, 0, Width, Height);   end;   inherited Paint; end; procedure Register; begin   RegisterComponents('Test',[TBackground]); end; end. The problem doesn't occur in run time, when buttons are drawn in front of the TBackground, as I would expect them to. In Linux everything is fine as well - also in design time. I attach three screenshots which depict the situation on a form. I'm using Lazarus 0.9.30.1 although the situation was the same in 0.9.30. Is this a bug and does anyone know any workaround for it? As you can imagine, with more complex controls it's really annoying not to see some of them in design time :]. Thanks in advance. ---------------------------------------------------------------------- Shebuka · 2011-07-04 09:44 Try to select your component, right click on it, z-order, move to back (and click on another component to see changes take effect). It helped me with TImage. ---------------------------------------------------------------------- caleb9 · 2011-07-04 09:57 Quote from: Shebuka on July 04, 2011, 11:44:52 amTry to select your component, right click on it, z-order, move to back (and click on another component to see changes take effect). It helped me with TImage. Thanks Shebuka. Unfortunately this doesn't work - tried both moving TGraphicControl to the back, and moving button to the front but it seems to have no effect. Neither on Linux, with the difference that over there the button is in the front. Edit: Actually I checked and for me it doesn't even work for TImage... ---------------------------------------------------------------------- felipemdc · 2011-07-04 18:10 You can report as a bug with a minimal project which reproduces the issue. There are some things wrong with the designer in LCL-Carbon, but on the good side it works very well at run time =) ---------------------------------------------------------------------- caleb9 · 2011-07-05 06:51 Quote from: felipemdc on July 04, 2011, 08:10:41 pmYou can report as a bug with a minimal project which reproduces the issue. There are some things wrong with the designer in LCL-Carbon, but on the good side it works very well at run time =) Done. :]