Hi Everyone!
I have trouble in finding a way to hide or let certain amounts of items be unable to see in a listbox.
Here is what I have done so far
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.Text
Case "Snacks"
ListBox1.Items.Insert(0, "Nacho(Hot)")
ListBox1.Items.Insert(1, "chips")
ListBox1.Items.Insert(2, "hotdogs")
Case "Drinks"
ListBox1.Items.Insert(0, "Coke")
ListBox1.Items.Insert(1, "Sprite")
ListBox1.Items.Insert(2, "L&P")
End Select
End Sub
I want to be able to hide the items in listbox1 in the other case if the first case is selected
e.g if I choose snacks, items Nacho,chips and hotdogs only show up; if I choose Drinks then items coke,Sprite and L&P only show up.
Any suggestions?
Thank you!