呵呵,这是foxtable一段的源代码,自己琢磨一下吧:
Dim Str1() As String = value.Split(ControlChars.FormFeed) 'Value是读取的文件内容
Dim Nodes As Windows.Forms.TreeNodeCollection = tr.Nodes
Dim Node As Windows.Forms.TreeNode
For Each s As String In Str1
If s = "Inner" Then
Nodes = Node.Nodes
ElseIf s = "Outer" Then
If Nodes(0).Parent.Parent Is Nothing Then
Nodes = tr.Nodes
Else
Nodes = Nodes(0).Parent.Parent.Nodes
End If
Else
Node = New Windows.Forms.TreeNode
Nodes.Add(Node)
Dim prps As String = s.spilit(vbtab)
node.name= prps(0)
node.Text = prps(1)
End If
Next
[此贴子已经被作者于2013-2-23 15:09:11编辑过]