ComboBox - TextBox
-
Hello. I'm a beginner to VB.NET, and i'm sure the solution to my question is easily achieved, however... I'm trying to have a list of items in a ComboBox. When the user clicks on an item in the combobox, there is a large textbox that I would like a few sentences to appear for each item. How would I go about doing that? Any help is appreciated ^_^ Thanks. :)
-
Hello. I'm a beginner to VB.NET, and i'm sure the solution to my question is easily achieved, however... I'm trying to have a list of items in a ComboBox. When the user clicks on an item in the combobox, there is a large textbox that I would like a few sentences to appear for each item. How would I go about doing that? Any help is appreciated ^_^ Thanks. :)
Hi, to add items to the combobox just use the items.add method: combobox.items.add("Item to add") to change the textbox catch the combobox selectedindex changed (or there maybe a click event as well) and then you have to choices, you can look ad the SelectedIndex property, carrying the index of the selected item or you can look at the Text property with the text of the item. Based on that with some if statements or a select case or even using the selectedindex for accessing an array you can update your textbox.
-
Hi, to add items to the combobox just use the items.add method: combobox.items.add("Item to add") to change the textbox catch the combobox selectedindex changed (or there maybe a click event as well) and then you have to choices, you can look ad the SelectedIndex property, carrying the index of the selected item or you can look at the Text property with the text of the item. Based on that with some if statements or a select case or even using the selectedindex for accessing an array you can update your textbox.