Foxtable(狐表)用户栏目专家坐堂 → [求助]遍历窗口中的每个页面中的按钮


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

主题:[求助]遍历窗口中的每个页面中的按钮

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


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

参考代码

 

Dim tab As WinForm.TabControl '= e.form.controls("TabControl1")
For Each p As WinForm.TabPage In tab.tabpages
    For Each c As object In p.Children
        msgbox(c.name)
    Next
Next


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


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

Dim tab As WinForm.TabControl '= e.form.controls("TabControl1")
For Each p As WinForm.TabPage In tab.tabpages

    If p.Text = "应付款按年汇总" Then
    For Each c As object In p.Children
        msgbox(c.name)
    Next

    End If
Next


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


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

Dim tab As WinForm.TabControl = e.form.controls("TabControl1")
For Each p As WinForm.TabPage In tab.tabpages
    If p.Text = "应付款按年汇总" Then
        For Each c As object In p.Children
            If typeof c Is winform.button Then
                msgbox(c.name)
            End If
        Next
    End If
Next

 回到顶部