vendredi 4 septembre 2015

How to make CheckButton work like a RadioButton

I am using DevExpress tools. I have 4 checkbuttons that need to work on 'radiobutton' principe.

I have this code:

private void cb1_Click(object sender, EventArgs e)
    {
        cb2.checked = false;
        cb3.checked = false;
        cb4.checked = false;
    }

...which I wrote for all of 4 checkbuttons so it meens I have 4*6 = 24 lines of code which is too much.

I assume there is much shorter way to get other checkbuttons unchecked when I press on one of them.




Aucun commentaire:

Enregistrer un commentaire