techmanbd
Junior Contributor
I made a combobox control array
I tried to make a "SelectedIndexChanged" sub for my array and I can't. It says that the control needs to be WithEvents. Now you can't use WithEvents for an array.
Is there a way so if I select something in the combobox list I can have something happen like the SelectedIndexChanged.
Code:
dim cboLoad(26) as controlbox
for x as integer = 1 to intChannels
sboLoad(x) = new controlbox
With cboLoad(x)
.Size = New Size(32, 16)
.Visible = True
.DropDownStyle = ComboBoxStyle.DropDownList
.Location = New Point(8, intXPoint)
For y As Integer = 0 To 6 Step 2
.Items.Add(y)
Next
End With
I tried to make a "SelectedIndexChanged" sub for my array and I can't. It says that the control needs to be WithEvents. Now you can't use WithEvents for an array.
Is there a way so if I select something in the combobox list I can have something happen like the SelectedIndexChanged.