[Lazarus] Transparent Container/Panel in LCL?
graeme at geldenhuys.co.uk
Mon Sep 3 16:55:47 CEST 2012
On 03/09/12 15:19, Felipe Monteiro de Carvalho wrote:
> Transparency is supported, just use TWinControl.SetShape(Region) or
It seems some people have different definitions of "transparency". Will
that make the TTransparentContainer clear like glass? Will I see through
it and see the main form's tiled canvas?
Anyway, I'm not 100% sure how to your the TRegion, so tried the
following. Still no luck. The TTransparentContainer doesn't look
"visually" transparent / see-thru.
procedure TForm1.FormCreate(Sender: TObject);
Width := 400;
r := TRegion.Create;
FMyContainer := TTransparentContainer.Create(self);
FMyContainer.Parent := self;
with FMyContainer do
Left := 50;
Top := 50;
Width := 300;
Height := 200;
r.AddRectangle(0, 0, FMyContainer.Width, FMyContainer.Height);
See attached image for the results.
- Graeme -
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5144 bytes
Desc: not available
More information about the Lazarus