On Monday 03 of September 2012 16:55:47 Graeme Geldenhuys wrote: > 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.
I don't know for gtk2 atm, but eg. under Qt QPainter have opacity property which does thing you want. Maybe it's possible under gtk2 (by using cairo) to do same thing. zeljko -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
