• Welcome to Valhalla Legends Archive.
 

Adding Icons to an ImageCombo

Started by haZe, March 19, 2003, 12:09 PM

Previous topic - Next topic

haZe

Everytime I try to add the icon, here is what I get:
-
Runtime Error '35613':

ImageList must be intitialized before it can be used.
-
My code is as follows
Private Sub Form_Load()
imgcmb.ComboItems.Clear
imgcmb.ComboItems.Add 1, , "Star: bw", 9
End Sub
What am I doing wrong? :-/

Grok

#1
Breathing.


imgcmb.ImageList = ImageList1

where "ImageList1" is the name of an imagelist you put on the form and filled with appropriate images.

Zakath

#2
Or I suppose you could use API functions to create one...not sure why you'd want to do that when you can just drag and drop, though.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Camel

#3
Quoteimgcmb.ImageList = ImageList1
alternatively, go in to the customize page for the listview and set *all* of the imagelist dropdowns to something (if even one of them isn't set, it'll give you that error as soon as you try to add an item with an icon)