Hi everyone.
I'm currently started in learning Visual Basic. At the moment, I'm creating programs just for practice, and I'm currently creating a burger restaurant order program.
But I'm really struggling with an issue. What I want is when I select a specific item from one combo box WITH another item from another combo box, it will then output
text for both text boxes.
For example, if the user selects 'Chicken Burger' Meal on the first combo box and then selects the size (e,g: small) on the second combo box, then:
The first text box will state "This is a small chicken burger', and the second text box states more information about the meal.
Here's my awful attempt of coding:
I have indeed classified the items for both collections on both combo boxes.
Any help would be much obliged.
I'm currently started in learning Visual Basic. At the moment, I'm creating programs just for practice, and I'm currently creating a burger restaurant order program.
But I'm really struggling with an issue. What I want is when I select a specific item from one combo box WITH another item from another combo box, it will then output
text for both text boxes.
For example, if the user selects 'Chicken Burger' Meal on the first combo box and then selects the size (e,g: small) on the second combo box, then:
The first text box will state "This is a small chicken burger', and the second text box states more information about the meal.
Here's my awful attempt of coding:
Code:
Private Sub ComboBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim burger_select As String
Dim burger_size As String
burger_select= ComboBox1.Text
burger_size = ComboBox2.Text
If ComboBox1.SelectedItem = "Chicken Meal" Then
If ComboBox2.SelectedItem = "Small" Then
TextBox1.Text = "Small Chicken Burger selected"
TextBox2.Text = "This is the supreme, classic chicken burger."
End IfI have indeed classified the items for both collections on both combo boxes.
Any help would be much obliged.