Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleUse an ImageCombo control
KeywordsImageCombo
CategoriesControls
 
Create an ImageList control and fill it with the pictures you want to use. Set the ImageCombo's ImageList property to this ImageList control.

Then use the ImageCombo's ComboItems collection's Add method to add new items to the ImageCombo.

 
Private Sub Form_Load()
Dim i As Integer

    ' Attach the ImageCombo to the ImageList that
    ' holds its pictures.
    Set ImageCombo1.ImageList = ImageList1

    ' Create some items.
    For i = 1 To ImageList1.ListImages.Count
        ImageCombo1.ComboItems.Add , , _
            ImageList1.ListImages(i).Key, i
    Next i

    ' Select the first item.
    Set ImageCombo1.SelectedItem = ImageCombo1.ComboItems(1)
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated