预告,下次更新后,可以这样:
HTML clipboardIndex
返回节点的位置。
例如要在选定节点位置插入一个新的节点:
Dim tr As WinForm.TreeView =
e.Form.Controls("TreeView1")
Dim nd As WinForm.TreeNode = tr.SelectedNode
Dim id As
Integer
= nd.index
If nd.ParentNode Is Nothing
Then
nd = tr.Nodes.Insert("新节点","新节点",id)
Else
nd = nd.ParentNode.Nodes.Insert("新节点","新节点",id)
End
If
tr.SelectedNode = nd '选择新插入的节点
tr.Select
'选择目录树