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:
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.