Index
返回节点的位置。
例如要在选定节点位置插入一个新的节点:
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
'选择目录树
本页地址:http://www.foxtable.com/webhelp/topics/1984.htm