我在Tabcontrol
的多个页面上填充多个组合框,而这种方法适用于表单上的组合框,它不适用于填充TabControl
上的组合框
For Each tab_page As Control In Me.TabControl1.TabPages
For Each temp_ctrl As Control In tab_page.Controls
If temp_ctrl.GetType.ToString = "System.Windows.Forms.ComboBox" Then
temp_cmb = CType(Me.Controls(temp_ctrl.Name), ComboBox)
For Each r As DataRow In dtab_KPI.Rows
temp_cmb.Items.Add(r(0))
Next
End If
Next
Next