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
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?
I don't think there is a .Visible property on listbox items. But for the ones you don't want you can easily execute a Items.Remove or Items.RemoveAt
A real way to do it would be to turn it into a data source, then you can create a query based on the top level item [Snacks] which would automatically filter the listbox to the correct items and automatically populate it. JR