mark 通用目录树下一节点
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim pdr As object
If trv.SelectedNode.ParentNode Is Nothing Then
pdr = trv
Else
pdr = trv.SelectedNode.ParentNode
End If
If pdr.nodes.count-1 = trv.SelectedNode.Index Then
If pdr.equals(trv) Then
If trv.SelectedNode.Index = pdr.nodes.count-1 Then
msgbox("已经到了最底")
Else
trv.SelectedNode = pdr.nodes(pdr.index+1)
End If
Else
Dim ppdr As object
If pdr.ParentNode Is Nothing Then
ppdr = trv
Else
ppdr = pdr.ParentNode
End If
If ppdr.nodes.count-1 = pdr.index Then
msgbox("已经到了最底")
Else
trv.SelectedNode = ppdr.nodes(pdr.index+1).nodes(0)
End If
End If
Else
trv.SelectedNode = pdr.nodes(trv.SelectedNode.Index+1)
End If
trv.Select