以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 隐藏下拉按钮 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=131994) |
-- 作者:良才 -- 发布时间:2019/3/11 13:11:00 -- 隐藏下拉按钮 Dim nms() As String = {"身份证号","班级","民族","父亲姓名","母亲姓名","户籍省","户籍县","户籍镇","父亲身份证号","母亲身份证号"} For Each nm As String In nms e.Form.Controls(nm).Enabled = False e.Form.Controls(nm).BackColor = Color.Gainsboro 如果是ComboBox控件隐藏下拉按钮 e.Form.Controls(nm).BaseControl.ShowDropDownButton = False End If Next 请老师指教,谢谢!
|
-- 作者:有点甜 -- 发布时间:2019/3/11 14:27:00 -- Dim nms() As String = {"身份证号","班级","民族","父亲姓名","母亲姓名","户籍省","户籍县","户籍镇","父亲身份证号","母亲身份证号"} For Each nm As String In nms Dim c = e.Form.Controls(nm) c.Enabled = False c.BackColor = Color.Gainsboro If typeof c Is winform.combobox c.BaseControl.ShowDropDownButton = False End If Next |
-- 作者:良才 -- 发布时间:2019/3/13 11:50:00 -- 谢谢 |