Dim Temp_Counter As Long
Dim Last_Page As Long ' 当前记录集的最后一页
Dim Start_Page As Long '
Dim x As Long
LV_Results.ListItems.Clear
Temp_Counter = 0
Set LI = LV_Results.ListItems.Add(, "a", "姓名")
LI.SubItems(1) = "级别"
LI.SubItems(2) = "总分"
LI.SubItems(3) = "平均得分"
With myRec
.MoveFirst
Do While Not .EOF
' DoEvents
If Trim(!lev) = Combo1.Text Then
Set LI = LV_Results.ListItems.Add(, "K" &!Name, Trim(!Name))
'LI.SubItems(0) = !Name
LI.SubItems(1) = Trim(!lev)
LI.SubItems(2) = Trim(!Allnum)
LI.SubItems(3) = Trim(!agvnum)
LI.ToolTipText = "由 " &Trim(!Name) &" 在" &!gdate &"创下的记录"
End If
.MoveNext
Loop
End With
//创建ListView的主项ListViewItem item
= new ListViewItem("MyListView")
//添加子项
item.SubItems.Add("Hello")
//类似的可以接着添加子项
item.SubItems.Add("World")
//把内容都添加进ListView
ListView.Items.Add(item)
添加后看到的结果应该是:
------------------------
MyListView│Hello│World
------------------------
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)