Getting Index from ImageList

V

Vaibhav

Hi..

Can anybody tell me how can iget the index of an image from an imagelist
after suppling the icon file name..

Thanx in advance
 
N

Nicholas Paldino [.NET/C# MVP]

Vaibhav,

Unless you have called the overload of the Add method on the
ImageList.ImageCollection instance exposed by the Images property on the
ImageList passing the name of the icon file, you can't do this. You have to
make sure the key is the name of the file, or keep a separate dictionary
that is keyed on the filename, which will return the instance of the image,
or the index in the image list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top