|
-
Dec 4th, 2009, 06:11 AM
#1
Thread Starter
New Member
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.
-
Dec 4th, 2009, 06:17 AM
#2
Addicted Member
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
-
Dec 4th, 2009, 06:18 AM
#3
Thread Starter
New Member
Re: combobox problem
i am going to try it and see if its working. tnx
-
Dec 4th, 2009, 06:26 AM
#4
Thread Starter
New Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|