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 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 -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 5259 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120903/8f438bcc/attachment.png>
