Greetings.
Right, I have came up with a few lines of codes.
I have 6 rows in the listview, and I need to add 1 comboBox to each row at subItem number 2.
At runtime, I could see 1 comboBox at row 1.
I guess all 6 combo boxes are piled up there.
Do Until myRS.EOF = True
Set objItem = listviewEIP.ListItems.Add(, "A" & myRS!com_code, myRS!com_name)
objItem.SubItems(1) = "Something"
objItem.SubItems(3) = "Anything"
myRS.MoveNext
Loop
comboID(0).Visible = False
With listviewEIP.ColumnHeaders
Load comboID(1)
Call fillCombo(1)
comboID(1).Top = listviewEIP.ListItems.Item(1).Height
comboID(1).Left = .Item(3).Left
comboID(1).Width = .Item(3).Width
comboID(1).Visible = True
SetParent comboID(1).hWnd, listviewEIP.hWnd
comboID(1).ZOrder
For i = 2 To 6
Load comboID(i)
fillCombo (i)
comboID(i).Top = listviewEIP.ListItems.Item(i - 1).Height
comboID(i).Left = .Item(3).Left
comboID(i).Width = .Item(3).Width
comboID(i).Visible = True
SetParent comboID(i).hWnd, listviewEIP.hWnd
comboID(i).ZOrder
Next i
End With
How can I solve that? Please help.
Thanks.