Set nodx1 = TreeView1.Nodes.Add(, , "root", "root")
Set nodx = TreeView1.Nodes.Add("root", 4, "child1", "child1")
TreeView1.Nodes.Add "root", 4, "child2", "child2"
TreeView1.Nodes.Add "child1", 4, "child1-1", "child1-1"
TreeView1.Nodes.Add "root", 4, "child3", "child3"
TreeView1.Nodes.Add "root", 4, "child4", "child4"
TreeView1.Nodes.Add "child2", 4, "child2-2", "child2-2"
TreeView1.Nodes.Add "child3", 4, "child3-3", "child3-3"
nodx.EnsureVisiblenodx1.Children有4个child
但为什么无法使用nodx1.next属性来一个一个的显示下一个child呢
Set nodx = TreeView1.Nodes.Add("root", 4, "child1", "child1")
TreeView1.Nodes.Add "root", 4, "child2", "child2"
TreeView1.Nodes.Add "child1", 4, "child1-1", "child1-1"
TreeView1.Nodes.Add "root", 4, "child3", "child3"
TreeView1.Nodes.Add "root", 4, "child4", "child4"
TreeView1.Nodes.Add "child2", 4, "child2-2", "child2-2"
TreeView1.Nodes.Add "child3", 4, "child3-3", "child3-3"
nodx.EnsureVisiblenodx1.Children有4个child
但为什么无法使用nodx1.next属性来一个一个的显示下一个child呢
set nodex=nodx1.child
For i=1 to nodex1.children
set nodex=nodex1.child
....
....
next
end if
if nodex1.children>0 then
set nodex=nodx1.child
For i=1 to nodex1.children
....
....
set nodex=nodex1.child
next
end if
while not nodx2 is nothing
...
set nodx2 = nodx2.next
wend