Foxtable(狐表)用户栏目专家坐堂 → [求助]复选框的问题


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

主题:[求助]复选框的问题

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


加好友 发短信
等级:幼狐 帖子:110 积分:1545 威望:0 精华:0 注册:2017/8/2 21:39:00
[求助]复选框的问题  发帖心情 Post By:2017/9/15 14:42: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 a4 As WinForm.CheckBox = e.Form.Controls("CheckBox4")
Dim a5 As WinForm.CheckBox = e.Form.Controls("CheckBox5")
Dim a6 As WinForm.CheckBox = e.Form.Controls("CheckBox6")
Dim a7 As WinForm.CheckBox = e.Form.Controls("CheckBox7")
Dim a8 As WinForm.CheckBox = e.Form.Controls("CheckBox8")
If a1.Checked = True Or a2.Checked = True Or a3.Checked = True Or a4.Checked = True Then
a5.Checked = False
a6.Checked = False
a7.Checked = False
a8.Checked = False
End If
If a5.Checked = True Or a6.Checked = True Or a7.Checked = True Or a8.Checked = True Then
a1.Checked = False
a2.Checked = False
a3.Checked = False
a4.Checked = False
End If
这样设置后5,6,7,8不能选择了,老师帮我看看阿有其他办法?谢谢老师

 回到顶部