Foxtable(狐表)用户栏目专家坐堂 → [求助]数组可以给给复选框控件赋值吗?


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

主题:[求助]数组可以给给复选框控件赋值吗?

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


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

Dim a1 As WinForm.CheckBox = e.Form.Controls("CheckBox1")
Dim a2 As WinForm.CheckBox = e.Form.Controls("CheckBox2")
Dim a3 As WinForm.CheckBox = e.Form.Controls("CheckBox3")
Dim vs() As String = {"Y","N","N"}
Dim ks() As object = {a1,a2,a3}
For l As Byte = 0 To 2
    If vs(l) = "Y" Then
        ks(l).checked = True
    Else
        ks(l).checked = False
    End If
Next

 回到顶部