关于treeview控件的一些问题!帮忙
我想用treeview控件做个东西
就是在Nodes中点任何一项,右边都出来响应的内容,就象一些读书器一样,还有我在为
Node对象加图片时,出错,不知道为什么,我头都大了。帮忙!
Option Explicit
Dim indrag As Boolean
Dim nodX As Object
Private Sub Form_Load()
Dim imgX As ListImage
Dim bitmappath As String
bitmappath = "C:\1\3"
Set imgX = ImageList1.ListImages.Add(, , LoadPicture(bitmappath))
TreeView1.ImageList = ImageList1
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , , "Parent1", 1)
Set nodX = TreeView1.Nodes.Add(, , , , "Parent2", 2)
Set nodX = TreeView1.Nodes.Add(1, tvwChild, , "child 1", 1)
Set nodX = TreeView1.Nodes.Add(1, tvwChild, , "child 2", 1)
Set nodX = TreeView1.Nodes.Add(2, tvwChild, , "child 3", 1)
Set nodX = TreeView1.Nodes.Add(2, tvwChild, , "child 4", 1)
Set nodX = TreeView1.Nodes.Add(3, tvwChild, , "child 5", 1)
nodX.EnsureVisible
End Sub
解决问题的高分,比结!