Rss & SiteMap

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

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

标题:[目录树]如何实现所有子节点的复选框未选,父节点的复选框也变成未选!

1楼
原来的我 发表于:2011/12/11 21:13:00
如题!
2楼
狐狸爸爸 发表于:2011/12/11 21:30:00

设置AfterCheckNode事件:

 

 

If e.node.Nodes.count > 0 Then
    Dim cnt As Integer
    For Each nd As WinForm.TreeNode In e.node.Nodes
        If nd.Checked Then
            cnt = cnt + 1
        End If
    Next
    If cnt = 0 Then
        e.node.Checked = False
    End If
End If
Dim pd As WinForm.TreeNode = e.Node.ParentNode
If pd IsNot Nothing Then
    Dim cnt As Integer
    For Each nd As WinForm.TreeNode In pd.Nodes
        If nd.Checked Then
            cnt = cnt +1
        End If
    Next
    If cnt = 0 Then
        pd.Checked = False
    End If
End If

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

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

Powered By Dvbbs Version 8.3.0
Processed in .01660 s, 2 queries.