以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]遍历控件问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=132097)

--  作者:fstzy
--  发布时间:2019/3/13 20:09:00
--  [求助]遍历控件问题
请问怎样可以遍历分区面板里的控件呢?
--  作者:有点甜
--  发布时间:2019/3/13 21:07:00
--  

参考代码

 

Dim p1 As WinForm.SplitPanel = e.Form.Controls("SplitContainer1").Panel1
For Each c As object In p1.children
    msgbox(c.name)
Next

Dim p2 As WinForm.SplitPanel = e.Form.Controls("SplitContainer1").Panel2
For Each c As object In p2.children
    msgbox(c.name)
Next