views:

59

answers:

1

well i have 2 radio buttons and each one exist in a different groupbox.
they they act as they are not related to each other.
but i want them to be as they exist in a same form.
is there a method to 2 that ?
i can do that by handling the the click and unchek the other checkbox but i was wondering if there is a better way?
thanks

Update:
currently i have

private void c_RadioButton1_CheckedChanged(object sender, EventArgs e)
{
    if (RadioButton1.Checked)
         RadioButton2.Checked = false;
}
private void c_RadioButton2_CheckedChanged(object sender, EventArgs e)
{
    if (RadioButton2.Checked)
         RadioButton1.Checked = false;
}

Update2: alt text

+2  A: 

If you only have one set of radio buttons, you can fake the UI out by placing them at the form level instead of inside of separate group boxes.

To do this in visual studio you will have to manually edit the designer generated code. Or place the radio buttons outside of the form and use your arrow keys to place it in the correct location.

You have to do this because once you drag the radio button with your mouse the designer will place it inside of the group box.

Jerod Houghtelling