就是考试系统上用到的单选题

解决方案 »

  1.   

    你把4个radioButton的CheckedChanged事件都选为radioButton1_CheckedChanged
     private void radioButton1_CheckedChanged(object sender, EventArgs e)
    {
               RadioButton rb = new RadioButton();
               rb = (RadioButton)sender;
               if(rb=radioButton1)
               else if(rb=radioButton2)
               else if(rb=radioButton3)
               else if(rb=radioButton4)
    }
      

  2.   

    同意:一个一个判断Checked属性
      

  3.   

    更改一下tabindex索引把4个radiobutton的tabindex改成一样的
      

  4.   

    不是啦,哪有那么麻烦?用一个groupbox把radiobutton框在一起就可以了,就是webform上的radiobuttonlist的效果了!
      

  5.   

    radiobutton a=radiobutton1.checked?r1:r2?r2:r3?r3:re4
      

  6.   

    将四个RadioButton都放在一个GroupBox上就OK了..自动实现每次只能选其一..统一放在一个GroupBox上布局也更统一..
      

  7.   

    把四个单选按钮放进一个面板,选择一个就知道选择那一个了.如下代码:
    Panel panel;//定义一个面板
    foreach(Control x in panel1.Controls) 
    {
            if(((System.Windows.Forms.RadioButton)x).Checked) 
            {
    MessageBox.Show(x.Text);//弹出一个对话框上面显示你选择的内容
    }
    }
      

  8.   

    标准的做法是在groupbox放入RadioButton来处理 。