我有一个表格,我有23 Comboboxes
。每个组合框写SelectedIndex=-1
肯定会工作,但我想知道是否有任何其他方式做到这一点,如下面给出的例子。 ?
为多个组合框设置相同的SelectedIndex值
For Each ctl As Control In (GroupBox1.Controls)
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
Next
我想这一点,
If TypeOf ctl Is ComboBox Then ctl.selectedIndex=-1 End If
但它没有工作。请帮助我。
以哪种方式不起作用?你把所有的组合框放在同一个容器内吗? (一个组框,一个面板,表格iteself) – Steve 2014-10-18 15:01:20
所有的组合都包含在groupbox中。 – Steve 2014-10-18 15:53:48