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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Imagecombo - How do I choose one item?

Status
Not open for further replies.

tg2003

IS-IT--Management
Feb 6, 2003
270
0
0
IL
Hi,

I just want to choose one of the items, so it will be displayed as the default choice of the imagecombo, but I can't do it. Don't know why.

When I use the old-and-good combobox, I use it as following:

Code:
combobox1.add "blahblah"
combobox1.text = combobox1.list(0)


Thanks!
 

revise your 'old-and-good combobox' and change it to:
Code:
Dim i As Integer
With Combo1
    For i = 1 To 20
        .AddItem "Item " & i
    Next i
    [green]'Show first Item[/green]
    [blue].ListIndex = 0[/blue]
End With

Have fun.

---- Andy
 
Remebering that ComboItems is 1-based, not 0-based:
Code:
ImageCombo1.ComboItems.Add , , "Hello", 1
ImageCombo1.ComboItems.Add , , "there", 1   
ImageCombo1.SelectedItem = ImageCombo1.ComboItems(1)
 
Thank you both.

I don't know why, but the imagecombo remains empty even after I use ".SelectedItem" method (It doesn't have "listindex" method)

My imagecombo is enabled and unlocked.

Thanks again!
 
It's working now - I'm sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top