Foxtable(狐表)用户栏目专家坐堂 → 目录树 计数对齐


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

主题:目录树 计数对齐

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/9/5 11:18:00 [显示全部帖子]

For Each nd As WinForm.TreeNode In trv.AllNodes
    Dim Value()As String
    Value = nd.FullName.Split("\") '注意这里用FullName属性,不能用FullPath属性
    Select Case nd.Level
        Case 0
            nd.Text = nd.Text.PadRight(13) & " (" &  Tables("基本信息查询_Table1").Compute("Count([学生姓名])",) & "人))"
        Case 1
            nd.Text = nd.Text.PadRight(15)  & " (" & Tables("基本信息查询_Table1").Compute("Count([学生姓名])","学期 = '"& e.Form.Controls("学期").Text  & "'and 班级 = '"& nd.Text &"'") & "人)"
    End Select
Next

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/9/5 14:35:00 [显示全部帖子]

For Each nd As WinForm.TreeNode In trv.AllNodes
    Dim Value()As String
    Value = nd.FullName.Split("\") '注意这里用FullName属性,不能用FullPath属性
    Dim str As String = ""
    Select Case nd.Level
        Case 0
            str = Tables("基本信息查询_Table1").Compute("Count([学生姓名])",)
            nd.Text = nd.Text.PadRight(13) & " (" & str.PadLeft(6) & "人))"
        Case 1
            str = Tables("基本信息查询_Table1").Compute("Count([学生姓名])","学期 = '"& e.Form.Controls("学期").Text  & "'and 班级 = '"& nd.Text &"'")
            nd.Text = nd.Text.PadRight(15)  & " (" & str.PadLeft(6) & "人)"
    End Select
Next

 回到顶部