Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: haZe on March 19, 2003, 12:09 PM

Title: Adding Icons to an ImageCombo
Post by: haZe on March 19, 2003, 12:09 PM
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? :-/
Title: Re: Adding Icons to an ImageCombo
Post by: Grok on March 19, 2003, 12:39 PM
Breathing.


imgcmb.ImageList = ImageList1

where "ImageList1" is the name of an imagelist you put on the form and filled with appropriate images.
Title: Re: Adding Icons to an ImageCombo
Post by: Zakath on March 19, 2003, 06:53 PM
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.
Title: Re: Adding Icons to an ImageCombo
Post by: Camel on March 21, 2003, 09:04 AM
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)