以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  关于 目录树。  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=118751)

--  作者:rxfmrqq
--  发布时间:2018/5/10 12:07:00
--  关于 目录树。

For Each nd As WinForm.TreeNode = tr.Level(2)

msgbox(nd.name)

next

老师,这个要怎么表示,

历遍目录树第二层的所有节点


--  作者:rxfmrqq
--  发布时间:2018/5/10 12:09:00
--  

还有历遍窗口中所有的 button

For Each nd As WinForm.button

if nd.name = "but1" then

msgbox(nd.name)

end if

next


--  作者:有点甜
--  发布时间:2018/5/10 12:23:00
--  
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes
    If nd.Level = 1 Then
        msgbox(nd.text)
    End If
Next