Foxtable(狐表)用户栏目专家坐堂 → [原创]遍历窗口指定TabControl里面的按钮控件(已解决)?


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

主题:[原创]遍历窗口指定TabControl里面的按钮控件(已解决)?

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/1/31 15:11:00 [显示全部帖子]

For Each p As WinForm.TabPage In e.Form.Controls("TabControl1").tabpages
    For Each c As object In p.Children
        If Typeof c Is winform.button Then
            msgbox(c.name)
        End If
    Next
Next

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/1/31 15:53:00 [显示全部帖子]

For Each p As WinForm.TabPage In e.Form.Controls("TabControl1").tabpages
    For Each c As object In p.Children
        If Typeof c Is winform.panel Then
            For Each cc As object In c.children
                If Typeof cc Is winform.button Then
                    msgbox(cc.name)
                End If
            Next
        End If
    Next
Next

 回到顶部