By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

ImageList images and name

P: n/a
Hi!

I'm wondering is it possible to give names for the images in the
imagelist somehow, and retrieve those images when needed by using code
like pic.Image = ImageList1.Images("Save") instead of pic.Image =
ImageList1.Images(1) ?

I'd like to retrieve images of the imagelist by name instead of image
index number because if order of those images are changed then index of
image may be no more same as referenced in the code, so name would be
better to use in this case.

I think something like this was possible to do with VB6 and earlier
versions.

--
Thanks in advance!

Mika
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mika,

I'm not sure if you put the images in a hashtable but that is probably the
structure you are looking for. You might want to check out the hashtable
documentation @
http://msdn.microsoft.com/library/de...classtopic.asp

Curtis

"Mika M" <ma***************@luukku.com> wrote in message
news:ug**************@TK2MSFTNGP15.phx.gbl...
Hi!

I'm wondering is it possible to give names for the images in the imagelist
somehow, and retrieve those images when needed by using code like
pic.Image = ImageList1.Images("Save") instead of pic.Image =
ImageList1.Images(1) ?

I'd like to retrieve images of the imagelist by name instead of image
index number because if order of those images are changed then index of
image may be no more same as referenced in the code, so name would be
better to use in this case.

I think something like this was possible to do with VB6 and earlier
versions.

--
Thanks in advance!

Mika

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.