-
combobox problem
i have 6 combobox and all of them have the same items. the items are random numbers. the problem is that i want the user to select a number from the first combobox but i dont want him to select the same number from the second one or the third. I hope you can understand what i mean.
-
Re: combobox problem
Maybe create a collections of integers, and when you select a number from one of the comboboxes, remove the number from the collection. Then update the comboboxes with the new numbers? Something like this:
Code:
Dim AvailableNumbers As New List(Of Int32)
For i As Int32 = 1 To 6
AvailableNumbers.Add(i)
Next
Sub OnNumberSelected(ByVal Number As Int32)
AvailableNumbers.RemoveAt(Number)
UpdateBoxes()
End Sub
-
Re: combobox problem
i am going to try it and see if its working. tnx :)
-
Re: combobox problem
since i am a beginner i cant understand that so if could explain it a little i would be greatful. oh and btw the numbers arent selected by me i use a randomize to get them.