|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming | |
Visual Studio 2005, 3 List boxes
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||
|
4.0 GHz
|
I KNOW I"M A NOOB... BUT PLEASE HELP ME>>>
so I have 3 listboxes and I want to make it so when I select colors from a list (for example) on listbox1 it shows the colors list on listbox2 and when I select like the color blue from listbox 2 it shows light and dark in listbox3... could someone construct something like this for me.... rep+ will be awarded for people who help....
__________________
Future Upgrades:
Jesus is my Savior
|
|||||||||||
|
|
|
|
|
#2 (permalink) | |||||||||||||
|
Intel oc'er in training
|
Try this. You'll have to edit the items for each listbox
Add the code below to the Form Load Sub Code:
Me.FillListBox1()
Me.ListBox2.Items.Clear()
Me.ListBox3.Items.Clear()
Code:
Private Sub FillListBox1()
With Me.ListBox1
.Items.Clear()
.Items.Add("List 1")
.Items.Add("List 2")
End With
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Me.ListBox2.Items.Clear()
Me.ListBox3.Items.Clear()
Select Case Me.ListBox1.SelectedIndex
Case 0
With Me.ListBox2
.Items.Clear()
.Items.Add("List 1 - Item 1")
.Items.Add("List 1 - Item 2")
End With
Case 1
With Me.ListBox2
.Items.Clear()
.Items.Add("List 2 - Item 1")
.Items.Add("List 2 - Item 2")
End With
End Select
End Sub
Private Sub ListBox2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged
Me.ListBox3.Items.Clear()
Select Case Me.ListBox1.SelectedIndex
Case 0
Select Case Me.ListBox2.SelectedIndex
Case 0
With Me.ListBox3
.Items.Clear()
.Items.Add("List 1 - Item 1 - subitem 1")
.Items.Add("List 1 - Item 1 - subitem 2")
End With
Case 1
With Me.ListBox3
.Items.Clear()
.Items.Add("List 1 - Item 2 - subitem 1")
.Items.Add("List 1 - Item 2 - subitem 2")
End With
End Select
Case 1
Select Case Me.ListBox2.SelectedIndex
Case 0
With Me.ListBox3
.Items.Clear()
.Items.Add("List 2 - Item 1 - subitem 1")
.Items.Add("List 2 - Item 1 - subitem 2")
End With
Case 1
With Me.ListBox3
.Items.Clear()
.Items.Add("List 2 - Item 2 - subitem 1")
.Items.Add("List 2 - Item 2 - subitem 2")
End With
End Select
End Select
End Sub
__________________
E6600 L717A @ 3560Mhz CPUz validated --> ID 242627 ...Gaming rig being rebuilt after new mobo...![]()
|
|||||||||||||
|
|
|
|
#3 (permalink) | |||||||||||
|
4.0 GHz
|
ok Thanks alot Zeus... i understand now.. alright
![]()
__________________
Future Upgrades:
Jesus is my Savior
|
|||||||||||
|
|
|
|
|
#4 (permalink) | ||||||||||||||
|
PC Gamer
|
would it be possible to get a screenshot of this, im a noob as well
![]()
__________________
Quote:
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination chicken.txt.
|
||||||||||||||
|
|
|
|
|
#5 (permalink) | |||||||||||||
|
Intel oc'er in training
|
I've attached a screenshot of the form running (if thats what you want ALIENIZED)
__________________
E6600 L717A @ 3560Mhz CPUz validated --> ID 242627 ...Gaming rig being rebuilt after new mobo...![]()
|
|||||||||||||
|
|
|
|
#6 (permalink) | |||||||||||||
|
Intel oc'er in training
|
I've attached the VB 2005 project for the above form (in case anyone wants it)
__________________
E6600 L717A @ 3560Mhz CPUz validated --> ID 242627 ...Gaming rig being rebuilt after new mobo...![]()
|
|||||||||||||
|
|
|
|
#7 (permalink) | ||||||||||||||
|
PC Gamer
|
yes, I was confused as to what you were making. but now I know
__________________
Quote:
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination chicken.txt.
|
||||||||||||||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|