I have groupbox with 2 element inside it. I want, when I click on one element inside group box then other element should be deselected. I can do it by making separate listener for all element. Like this.
private void maleBox(object sender, MouseEventArgs e)
{
if (femaleCheckBox.Checked)
{
femaleCheckBox.Checked = false;
}
}
private void femleBox(object sender, EventArgs e)
{
if (maleCheckBox.Checked)
{
maleCheckBox.Checked = false;
}
}
But I want a single click listener which handle it.
Aucun commentaire:
Enregistrer un commentaire