Getting Index from ImageList

  • Thread starter Thread starter Vaibhav
  • Start date Start date
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
 
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.
 
Back
Top