Hi,
I used this code to created 2 combo boxes General and Specific...and Only show Specific (Combo B) when Combo A is chosen.....
- What i need now is to know how to assign specific values to the items in combo b (Specific).???
If i chose a sode, Fanta, i want the total price to be $20.00 (this price will show up in the finial price box....Please Help!!
-
drinkComboBox.Items.Clear() 'Clears the old items out of the drinkComboBox
-
-
If typeComboBox.SelectedText = "Soda" Then 'If the user selected Soda then...
-
drinkComboBox.Items.Add("Fanta") 'Add soda drinks to the drinkComboBox
-
drinkComboBox.Items.Add("Sprite")
-
drinkComboBox.Items.Add("Coke")
-
End If
-
-
If typeComboBox.SelectedText = "Juice" Then 'If the user selected Juice then...
-
drinkComboBox.Items.Add("Apple") 'Add juices to drinkComboBox
-
drinkComboBox.Items.Add("Grape")
-
drinkComboBox.Items.Add("Pear")
-
End If
-
-
Private Sub xGeneralComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xGeneralComboBox.SelectedIndexChanged
-
-
Me.xSpecificComboBox.Enabled = True
-
-
Me.xSpecificComboBox.Items.Clear()
-
-
Select Case Me.xgeneralComboBox.SelectedText
-
-
Case "Soda"
-
-
Me.xSpecificComboBox.Items.Add("Sprite")
-
-
Me.xSpecificComboBox.Items.Add("Fanta")
-
-
Me.xSpecificComboBox.Items.Add("coke")
-
-
Case "Juice"
-
Me.xSpecificComboBox.Items.Add("Apple")
-
-
Me.xSpecificComboBox.Items.Add("Grape")
-
-
Me.xSpecificComboBox.Items.Add("Pear")
-
-
End Select
-
End Sub