vb 中listview的相关问题
如何将数组 a中的值变为listview中的某列显示出来 --------------------编程问答-------------------- Dim a(10) As Stringa(0) = "100"
a(1) = "100"
a(2) = "200"
a(3) = "300"
a(4) = "100"
a(5) = "2500"
a(6) = "100"
a(7) = "100"
a(8) = "3500"
a(9) = "100"
For i = 0 To UBound(a)
List1.List(i) = a(i)
Next --------------------编程问答--------------------
修正一下,for循环里应是 list1.AddItem a(i) --------------------编程问答-------------------- 再修正:
前面加List1.Clear
--------------------编程问答-------------------- lsv.ListItems.Clear
Dim itmX As ListItem
Dim i As Integer
For i=LBound(a) to UBound(a)
Set itmX = lsv.ListItems.Add(, , CStr(i))
itmX.SubItems(1) = CStr(a(i))
Next i --------------------编程问答-------------------- 是listview,不是ListBox --------------------编程问答-------------------- 顶下4楼 --------------------编程问答--------------------
这个就是可以了 --------------------编程问答--------------------
cao,居然看走眼了,顶4楼的
补充:VB , COM/DCOM/COM+