On 03/09/12 15:19, Felipe Monteiro de Carvalho wrote:
Transparency is supported, just use TWinControl.SetShape(Region) or SetShape(Bitmap);
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);
var
r: TRegion;
begin
Width := 400;
r := TRegion.Create;
FMyContainer := TTransparentContainer.Create(self);
FMyContainer.Parent := self;
with FMyContainer do
begin
Left := 50;
Top := 50;
Width := 300;
Height := 200;
r.AddRectangle(0, 0, FMyContainer.Width, FMyContainer.Height);
SetShape(r);
end;
...
end;
See attached image for the results.
Regards,
- Graeme -
<<attachment: test2.png>>
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
