Foxtable(狐表)用户栏目专家坐堂 → 请教目录树


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

主题:请教目录树

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/9/7 10:37:00 [只看该作者]

mark 拷贝节点

 

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim trv2 As WinForm.TreeView = e.Form.Controls("TreeView2")
Dim ls As New List(Of Object)
ls.add(trv2)
For Each nd As WinForm.TreeNode In trv.AllNodes
    If nd.Level >= 2 Then
        Dim idx As Integer = nd.level-2
        Dim nnd = ls(idx).Nodes.Add(nd.Name, nd.Text)
        If nd.Nodes.count > 0 Then
            If idx >= ls.count - 1 Then
                ls.add(nnd)
            Else
                ls(idx+1) = nnd
            End If
        End If
    End If
Next


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