Foxtable(狐表)用户栏目专家坐堂 → [求助]请教怎么遍历窗口表


  共有3733人关注过本帖树形打印复制链接

主题:[求助]请教怎么遍历窗口表

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106689 积分:542640 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/5/7 14:11:00 [显示全部帖子]

For Each p As WinForm.TabPage In e.Form.Controls("TabControl1").tabpages
    For Each c As WinForm.Control In p.children
        If TypeOf c Is WinForm.Table Then '判断控件是否是Table
            Dim t As WinForm.Table = c '使用特定类型的变量引用控件
            MessageBox.Show(t.name)
        ElseIf TypeOf c Is WinForm.Panel Then
            Dim pnl As WinForm.Panel = c
            For Each c2 As WinForm.Control In pnl.children
                If TypeOf c2 Is WinForm.Table Then '判断控件是否是Table
                    Dim t2 As WinForm.Table = c '使用特定类型的变量引用控件
                    MessageBox.Show(t2.name)
                End If
            Next
        End If
    Next
Next

 回到顶部