Foxtable(狐表)用户栏目专家坐堂 → [求助]请教狐爸,关于目录树


  共有7644人关注过本帖平板打印复制链接

主题:[求助]请教狐爸,关于目录树

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251060 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2013/2/23 15:08:00 [只看该作者]

呵呵,这是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编辑过]

 回到顶部
总数 13 1 2 下一页