以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 遍历TabControl,设只读 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=131323) |
-- 作者:恒隆君 -- 发布时间:2019/2/23 1:22:00 -- 遍历TabControl,设只读 将页面1,ComboBox 设为只读。 以下代码错在哪里? Dim pg As WinForm.TabPage pg = e.Form.Controls("TabControl_rk").TabPages(1) \'遍历TabControl里面的按钮控件(按钮是放在页面中的面板) For Each c As object In pg.Children If Typeof c Is winform.GroupBox Then For Each cc As object In c.children If Typeof cc Is winform.ComboBox Then If User.IsRole("收货员") Then cc.ReadOnly = BooleanEnum.False Else cc.ReadOnly = BooleanEnum.True End If End If Next End If Next
|
-- 作者:有点蓝 -- 发布时间:2019/2/23 8:47:00 -- 代码没有问题。所有组合框都在GroupBox里面? |