Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]设置TreeView图标

1楼
qtcks 发表于:2010/8/6 11:05:00

寻求子节点定位方法

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目17.rar

2楼
qtcks 发表于:2010/8/6 13:27:00

麻烦的解决方法。

Dim cmd As New SQLCommand
cmd.CommandText = "Select {表A}.[第一列] As [分组],{表B}.[第一列] As [样式] from {表A} inner join {表B} on {表A}.[样式]={表B}.[_Identify]"
Dim dt As datatable
dt = cmd.ExecuteReader()

Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim tn As WinForm.TreeNode
tr.ExpandAll
Dim ys() As String = dt.GetComboListString("样式").Split("|")   '获取图标样式的总类数
For Each y As String In ys
    For Each ysr As DataRow In dt.Select("样式 = '" & y & "'")   '遍历列表样式=当前样式
        Dim xxx() As String = ysr("分组").Split("\")
        output.show(xxx.Length)
        Select Case xxx.Length
            Case 1
                tr.nodes(xxx(0)).IconFile = y & ".ico"
            Case 2
                tr.nodes(xxx(0)).nodes(xxx(1)).IconFile = y & ".ico"
            Case 3
                tr.nodes(xxx(0)).nodes(xxx(1)).nodes(xxx(2)).IconFile = y & ".ico"
            Case 4
            Case 5
            Case 6
            Case 7
            Case 8
            Case Else
               
        End Select
    Next
Next

3楼
狐狸爸爸 发表于:2010/8/6 15:04:00

已经不错了

 

图片点击可在新窗口打开查看

共3 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02832 s, 3 queries.