哪位大哥可以分享个简单易学的listview的实例啊?
小弟新手初学,学到listview一片茫然所以想找个简单点儿的例子先模拟一下然后再自己写小弟想实现的效果
1.以报表方式显示数据
2.双击listview的某一行能够与text同步更新并通过ADO实现增 删 改
先谢过各位大哥了 --------------------编程问答-------------------- 先把分给我,我把工程发到你邮箱!!你还要把邮箱回复给我。 --------------------编程问答--------------------
Private Sub Form_Load()--------------------编程问答-------------------- Private Sub Command1_Click()
ListView1.View = lvwReport
ListView1.Icons = ImageList1
ListView1.SmallIcons = ImageList1
ListView1.ColumnHeaderIcons = ImageList1
For I = 1 To 5
ListView1.ColumnHeaders.Add , , "第" & I & "列", , , I
Next
For I = 1 To 5
ListView1.ListItems.Add , , "第" & I & "行", I, I
For j = 1 To 5
ListView1.ListItems(I).ListSubItems.Add , , "第" & j + 1 & "列", j
Next
Next
End Sub
'以图标的形式进行显示
ListView1.View = lvwIcon
End Sub
Private Sub Command2_Click()
'以列表的形式进行显示
ListView1.View = lvwList
End Sub
Private Sub Form_Load()
Set itmX = ListView1.ListItems.Add(, , "张丹", 1)
Set itmX = ListView1.ListItems.Add(, , "李娜", 1)
Set itmX = ListView1.ListItems.Add(, , "易做图", 1)
Set itmX = ListView1.ListItems.Add(, , "琴雪", 1)
Set itmX = ListView1.ListItems.Add(, , "赵丽", 1)
Set itmX = ListView1.ListItems.Add(, , "赵艳", 1)
Set itmX = ListView1.ListItems.Add(, , "缘刚", 1)
Set itmX = ListView1.ListItems.Add(, , "周红", 1)
Set itmX = ListView1.ListItems.Add(, , "李丽", 1)
Set itmX = ListView1.ListItems.Add(, , "宏艳", 1)
Set itmX = ListView1.ListItems.Add(, , "江五", 1)
Set itmX = ListView1.ListItems.Add(, , "张红", 1)
End Sub
--------------------编程问答--------------------
Private Sub Command1_Click()
'以图标的形式进行显示
ListView1.View = lvwIcon
End Sub
Private Sub Command2_Click()
'以列表的形式进行显示
ListView1.View = lvwList
End Sub
Private Sub Form_Load()
Set itmX = ListView1.ListItems.Add(, , "张丹", 1)
Set itmX = ListView1.ListItems.Add(, , "李娜", 1)
Set itmX = ListView1.ListItems.Add(, , "易做图", 1)
Set itmX = ListView1.ListItems.Add(, , "琴雪", 1)
Set itmX = ListView1.ListItems.Add(, , "赵丽", 1)
Set itmX = ListView1.ListItems.Add(, , "赵艳", 1)
Set itmX = ListView1.ListItems.Add(, , "缘刚", 1)
Set itmX = ListView1.ListItems.Add(, , "周红", 1)
Set itmX = ListView1.ListItems.Add(, , "李丽", 1)
Set itmX = ListView1.ListItems.Add(, , "宏艳", 1)
Set itmX = ListView1.ListItems.Add(, , "江五", 1)
Set itmX = ListView1.ListItems.Add(, , "张红", 1)
End Sub
--------------------编程问答-------------------- 楼上各位大哥都没注意细看我的要求,我要的是IvwReport 1.以报表方式显示数据
2.双击listview的某一行能够与text同步更新并通过ADO实现增 删 改
--------------------编程问答-------------------- 晕了,偶散40分也没人帮忙啊?
补充:VB , 控件