首先需要添加一个ImageList控件,然后设定ImageCombo 的Custom中设定与ImageList连接 下面是添加项到ImageCombo 的代码: Private Sub Form_Load() Dim x As ComboItem For i = 1 To 3 Set x = ImageCombo1.ComboItems.Add x.Text = "abcd" + Str(i) x.Image = i Next i End Sub
setmenothing() 所说有误,ImageCombo 是没有 addItem 方法的 只能使用 ImageCombo1.ComboItems.Add 方法TechnoFantasy(www.applevb.com) 的方法我没有试过,但思路正确。只是有点麻烦。 不妨直接使用 ImageCombo1.ComboItems.Add , , "abcd" & i, i
下面是添加项到ImageCombo 的代码:
Private Sub Form_Load()
Dim x As ComboItem
For i = 1 To 3
Set x = ImageCombo1.ComboItems.Add
x.Text = "abcd" + Str(i)
x.Image = i
Next i
End Sub
只能使用 ImageCombo1.ComboItems.Add 方法TechnoFantasy(www.applevb.com) 的方法我没有试过,但思路正确。只是有点麻烦。
不妨直接使用 ImageCombo1.ComboItems.Add , , "abcd" & i, i