以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]TreeView全选和反选 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=145511) |
-- 作者:atiwhl5 -- 发布时间:2020/1/26 23:49:00 -- [求助]TreeView全选和反选 一个TreeView显示复选框,和两个个按钮一个全选,一个反选 如何在点击按钮实现全选和反选
[此贴子已经被作者于2020/1/26 23:48:45编辑过]
|
-- 作者:y2287958 -- 发布时间:2020/1/27 9:08:00 -- 全选 Dim trv As WinForm.TreeView = Forms("窗口1").Controls("TreeView1") For Each nd As WinForm.TreeNode In trv.AllNodes nd.Checked = True Next
---------------------------------------------------------------------
反选 Dim trv As WinForm.TreeView = Forms("窗口1").Controls("TreeView1") For Each nd As WinForm.TreeNode In trv.AllNodes nd.Checked = not nd.Checked Next |
-- 作者:atiwhl5 -- 发布时间:2020/1/27 15:19:00 -- 谢谢 |