Hi!
On my Form I have:
1. One combobox
2. One label
3. One button
I have write these simples codes to display all the combobox'items to my label sequently (or automatically) when I click my button. But its doesnt do it. Thanx so much.
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < comboBox1.Items.Count; i++)
{
label1.Text = comboBox1.SelectedItem[i].ToString();
}
label1.Text = label1.Text;
}
9 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Himanshu GuptaPosted Sep 15, 2017, 8:13 AM
IsraelPosted Sep 19, 2017, 6:49 PM
IsraelPosted Sep 15, 2017, 7:46 AM
IsraelPosted Sep 13, 2017, 4:41 AM
Himanshu GuptaPosted Sep 13, 2017, 12:52 AM
Ramesh PalanivelPosted Sep 13, 2017, 12:26 AM
IsraelPosted Sep 12, 2017, 4:29 PM
Ramesh PalanivelPosted Sep 12, 2017, 9:17 AM
Himanshu GuptaPosted Sep 12, 2017, 9:12 AM