-- 作者:fubblyc
-- 发布时间:2016/11/29 17:03:00
--
For Each ctl As WinForm.Control In e.Form.Controls \'遍历所有控件 If TypeOf ctl Is WinForm.CheckBox Then \'如果此控件是RadionButton(单选框) Dim rdo As WinForm.CheckBox = ctl If rdo.Checked Then \'如果已经选中 e.Form.DropDownBox.Value = rdo.Text \'将此单选框的文本赋值给下拉组合框 e.Form.DropDownBox.CloseDropdown() \'关闭下拉窗口 Exit For End If End If Next
以上是帮助文档的内容
以下是我自己写的:
dim s as .....
For Each ctl As WinForm.Control In e.Form.Controls \'遍历所有控件 If TypeOf ctl Is WinForm.CheckBox Then \'如果此控件是
Dim rdo As WinForm.CheckBox = ctl If rdo.Checked Then \'如果已经选中 s
Exit For End If End If Next
e.Form.DropDownBox.Value = s \'将此单选框的文本赋值给下拉组合框 e.Form.DropDownBox.CloseDropdown() \'关闭下拉窗口
|