469,942 Members | 2,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,942 developers. It's quick & easy.

C# - Problemīs changing the ImageSize (ImageList)

Hi, Iīm using this code for changing the size property of an ImageList :
ImageList.ImageSize = new Size(32,32);

However , the Icon property just lostīs his data.

Before code:

ImageList.Images.Count == 1

After:

ImageList.Images.Count == 0

Anyone have an idea ???

PS: The image itīs an ICO with 16x16 and 32x32. It workīs if I change the
imageSize at design time.

Sorry about my poor english and Thanks !!! :=)
Nov 22 '05 #1
1 6060
All images in an ImageList are expected to be the same size (or will be fit
into it when added). Changing the size resets the ImageList If you need to
programmatically resize the ImageSize property, do it before adding the
images.

"SpaceMind" <vi*********@hotmail.com> wrote in message
news:uQ****************@TK2MSFTNGP11.phx.gbl...
Hi, Iīm using this code for changing the size property of an ImageList :
ImageList.ImageSize = new Size(32,32);

However , the Icon property just lostīs his data.

Before code:

ImageList.Images.Count == 1

After:

ImageList.Images.Count == 0

Anyone have an idea ???

PS: The image itīs an ICO with 16x16 and 32x32. It workīs if I change the
imageSize at design time.

Sorry about my poor english and Thanks !!! :=)

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by SpaceMind | last post: by
3 posts views Thread by michael haller | last post: by
3 posts views Thread by feel | last post: by
2 posts views Thread by Li Zhang | last post: by
7 posts views Thread by Andrew Christiansen | last post: by
7 posts views Thread by Roger | last post: by
2 posts views Thread by JR | last post: by
reply views Thread by bsturg21 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.