Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
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-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated