tags:

views:

11

answers:

1

dear sir, I m working in delphi-2010 i have an imagelist,in which i have added some .png images. and i have also picture for showing the picture from imagelist. i want to show the picture on picture box from imagelist.

i wrote the following code,but here addImage(,) takes 2 argument one is Values:TCustomImagelist and another is Index of Image

how i identify the value of customimagelist.

image1.Picture:=imagelist1.AddImage( , );

A: 

TImageList.AddImage adds a single image from one TImageList to another. I don't think this is what you intended.

If you want to show one of the images from a TImageList in a TImage, you could use something like this:

imageList1.GetBitmap(0, image1.Picture.Bitmap);
Bruce McGee