Board index » delphi » TImageList

TImageList

Why can I interactively add images of different sizes to a TImageList,
but when I try this programmatically I get 'Invalid image size'
errors?  Or is there a way?

Thanks in advance.

Steven.

 

Re:TImageList


An ImageList can only contain images of a single size. If you want to add an
image of a different size you have to stretch and/or crop the image.
Load the image in a TBitmap, stretch and/or crop the image with
(Stretch)Draw on a bitmap with the correct size and use TImageList.Add on
the second bitmap..

"SH." <shREM...@datacore.demon.co.uk> schreef in bericht
news:39254d81.22148634@nnrp.news.uk.psi.net...

Quote
> Why can I interactively add images of different sizes to a TImageList,
> but when I try this programmatically I get 'Invalid image size'
> errors?  Or is there a way?

> Thanks in advance.

> Steven.

Other Threads