Foxtable(狐表)用户栏目专家坐堂 → [求助]导出目录树数据


  共有3351人关注过本帖树形打印复制链接

主题:[求助]导出目录树数据

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


加好友 发短信
等级:超级版主 帖子:110738 积分:563610 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/11/7 23:15:00 [显示全部帖子]

参考:

Dim trv As WinForm.TreeView = Forms("窗口1").controls("TreeView1")
Dim dr As DataRow
Dim str() As String = {"根目录","子目录","窗口名","按钮名称","按钮标题"}
For Each n As WinForm.TreeNode In trv.AllNodes
    If n.Nodes.Count = 0 Then
        Dim arr() As String = n.FullPath.Split("\")
        dr = DataTables("窗口控件管理表").AddNew
        For i As Integer = 0 To arr.Length - 1
            dr(str(i)) = arr(i)
        Next
    End If
Next

 回到顶部