Shadow not showing

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
mendelo
Newbie
Newbie
Posts: 11
Joined: Wed Sep 26, 2007 12:00 am

Shadow not showing

Post by mendelo » Thu Jan 24, 2008 2:34 am

Probably a simple answer that I cannot figure out. I cannot get the shadow to appear in an Imageshape. Everything works fine but no shadow. Code as follows:

procedure AddShape1 (Bitmap1 : TBitmap , TreeX,TreeY : integer);
var
V : TImageShape;
begin
With Tree1 do
begin
V:= TImageShape.Create(Tree1);
v.AutoPosition.Left:= false;
v.AutoPosition.Top:= false;
AddNewShape(V,TreeX,TreeY,'',nil);
V.AutoSize:= false;

V.Width:= Bitmap1.Width;
V.Height:= Bitmap1.Height;

V.Image.Assign(bit);
V.Image.Transparent:= true;

V.Shadow.Color:= clBlack;
V.Shadow.Size:= 10;
V.Shadow.Visible:= true;

end;

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Thu Feb 14, 2008 9:24 pm

Default a TImageShape Transparent property is set to true. If the Transparent property is True, no shadow is drawn.

In your code you need to set the Transparent property to False, as in:

Code: Select all

V.Transparent := False

Post Reply