For Each ctl As WinForm.Control In e.Form.Controls '遍历所有控件
If TypeOf ctl Is WinForm.RadioButton Then '如果此控件是RadionButton(单选框)
Dim rdo As WinForm.RadioButton = ctl
If rdo.Checked Then '如果已经选中
e.Form.DropDownBox.Value = rdo.Text '将此单选框的文本赋值给下拉组合框
e.Form.DropDownBox.CloseDropdown() '关闭下拉窗口
Exit For
End If
End If
Next
以上代码中的
e.Form.Controls 遍历当前下拉窗口窗体的控件
e.Form.DropDownBox.Value 中的DropDownBox是指当前下拉窗口还是绑定窗口的DROPDOWNBOX??
越看越混淆,请指点迷津!