vendredi 3 février 2017

i want to affiche the text of checkBox in a textBox after clicking in a button c#

After I click a button the cursor should change position to another TextBox

private void btnOk_Click(object sender, EventArgs e)
{
    if (checkBox1.Checked)
        txtAffiche.Text = txtAffiche.Text + Environment.NewLine + checkBox1.Text;
    else if (checkBox2.Checked)
        txtAffiche.Text = txtAffiche.Text + Environment.NewLine + checkBox2.Text;
    else if (checkBox3.Checked)
        txtAffiche.Text = txtAffiche.Text + Environment.NewLine + checkBox3.Text;
    else if (checkBox4.Checked)
        txtAffiche.Text = txtAffiche.Text + Environment.NewLine + checkBox4.Text;

}

Aucun commentaire:

Enregistrer un commentaire