Click here to Skip to main content
16,020,377 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I have 30 label and one combo box and I want when user click on label the combo box
show text of label and my combo has value.

Please guide me.
Posted
Updated 5-Jul-11 19:18pm
v2
Comments
Sergey Alexandrovich Kryukov 6-Jul-11 1:50am    
OK, if you want it, please, you may do it. No problem.
I hope you will do it by yourself, or... do you have any questions?
--SA

Use this code

if (comboBox1.DropDownStyle == DropDownList)
{
comboBox1.Items.Add(Label1.Text);
comboBox1.Text = Label1.Text;
}
else
{
comboBox1.Text = Label1.Text;
}
 
Share this answer
 
Hope this[^] might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900