How to use comboBox
Post your questions regarding programming in C# in here.
4 posts
Page 1 of 1
I would like to introduce some information in ComboBox in vb C# and when a select any information from the ComboBox such information has to be filled in the respective field.How can I do that?
Using code, you could add items to the ComboBox like so:
As for inputting the ComboBox data into a TextBox, for instance, you can use the following code:
Anyways, hope this helps ;)
Code: Select all
Or, you could go to the ComboBox's properties and click on '...' next to the 'Items' property. This will bring up a window where gou can manually enter the items.ComboBox.Items.Add("ItemName")
As for inputting the ComboBox data into a TextBox, for instance, you can use the following code:
Code: Select all
This should work, but I'm on a mobile right now so I cannot double-check.TextBox1.Text=ComboBox1.SelectedItem
Anyways, hope this helps ;)
Its in the C# section ;)
Code: Select all
textBox1.Text = comboBox1.SelectedItem.ToString()
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

MrAksel wrote:Its in the C# section ;)Oh, I see. Sorry about that. I got confused, as he named both languages in his post :lol:Code: Select alltextBox1.Text = comboBox1.SelectedItem.ToString()
hortencio wrote:in vb C#
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023