How do you tag the images in an image list? I am loading about 10 random images and I need some way to reference them. There is no tag property and the class is not inheritable so I don't know of any other way to do this.
Any ideas?
Printable View
How do you tag the images in an image list? I am loading about 10 random images and I need some way to reference them. There is no tag property and the class is not inheritable so I don't know of any other way to do this.
Any ideas?
Huh? Just reference them by Index number.
dim img as Image=ImageList1.Images(0)
Sorry, I should have been more specific. I need a text reference that I can assign the image when it's loaded into the ImageList. The images order may change depending on how the user loads the program so I can't rely on the same image being at the same index every time so I need some way of identifying that image 0 = "AddGlyph", Image 1="EditGlyph"...etc
Use a hashtable to link the name and index when they are added to the ImageList.