Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image list problem

Status
Not open for further replies.

cmz21

Programmer
May 5, 2005
110
US
i keep getting the error "Imagelist must be initialized before it can be used"
Any idea why this is happening or how I fix it?

Thanks
cmz
 
You have to set the .ImageList property to the name of your imagelist before you call images from it e.g.
Code:
Toolbar1.ImageList = MyImageList
Hope this helps

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
You don't have to set it everytime you want to reference it in the Sub. Just the once before you try and use any of the images within it.

Hope this helps

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
I figured it out....I had to link it to a treeview on my form.

Thanks anyway

cmz
 
How did you link it to the treeview?

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
I selected the treeview in my form, clicked the elipses next to 'custom' in the properties box, and set the imagelist drop down box to my imagelist.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top