Question

Locked

combobox and textbox question

By brian ·
I have a combobox in VB 2005 that contains a list of two character numbers and letters. I also have a locked textbox that i have set so it can not be changed. I am trying to get the program to show me when A1 is selected in the combo box, the textbox displays an associated name. I am newer to programming so any help would be wonderful!

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Basically Add an Event handler to the combo box

by Tony Hopkinson In reply to combobox and textbox ques ...

For OnSelectedIndexChange (or SelectedItemChange)

If the displayed text is you look up key.

Then Combobox1.SelectedItem.ToString();
should give you that. Do your lookup and then set the textBox's Text property to the content.

Hths


PS take into account there could be nothing selected in the ComboBox

SelectedIndex < 0
SelectedItem = Nothing.

C# guy, so excuse the VB syntax.

Back to Software Forum
2 total posts (Page 1 of 1)  

Software Forums