Hi,How do I create a transparent container/panel in LCL? I tried the following code, and as you can see, csOpaque is not defined in the ControlStyle property.
-----------------------------------
type
TTransparentContainer = class(TCustomControl)
public
constructor Create(AOwner: TComponent); override;
end;
constructor TTransparentContainer.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
// Do not include [csOpaque] because we want a transparent widget.
ControlStyle := [csAcceptsControls, csNoFocus];
end;
-----------------------------------
Please see attached the result at runtime. The grey box in the middle of
the form (which contains a TLabel and TButton) is not "transparent"
container. Not very transparent because the form's tiled background is
not showing through.
Maybe I misunderstood the [csOpaque] option, though I though it seems self explanatory.
I'm using Lazarus v1.0 GTK2 under Linux with FPC 2.6.0 on 64-bit OpenSUSE 12.1
Any tips? Regards, - Graeme -
<<attachment: test.png>>
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
