Re: Possible TImageList bug in D7? or..?
- From: "James Bond" <James.Bond@xxxxxxxxxx>
- Date: Wed, 28 Jun 2006 13:26:39 +0200
You're right !
Uses this function :
function LoadFile(const Img: TImageList; const FileName: String): Boolean;
var
bmp, bmp2 : TBitmap;
begin
Result := False;
bmp := TBitmap.Create;
bmp2 := TBitmap.Create;
try
// Load file
if FileExists(FileName) then bmp.LoadFromFile(FileName)
else exit;
// Modify size
bmp2.Height := Img.Height;
bmp2.Width := Img.Width;
bmp2.Canvas.StretchDraw(Rect(0, 0, Img.Width, Img.Height), bmp);
// Add the file in TImageList
Img.Add(bmp2, nil);
Result := True;
finally
bmp.Free;
bmp2.Free;
end;
end;
.
- References:
- Possible TImageList bug in D7? or..?
- From: JamesR
- Possible TImageList bug in D7? or..?
- Prev by Date: Re: (newbie) Find Max Number In An Array
- Next by Date: Working with TImageList
- Previous by thread: Re: Possible TImageList bug in D7? or..?
- Next by thread: Working with TImageList
- Index(es):