我winForm界面里有一个RadioButton,我在后台代码里this.RadioButton1.checked=true;
但是每次打开界面的时候还是没选中,请问是为什么?

解决方案 »

  1.   

    我这里有两个radioButton,我做了一个判断
    if(.....)
    {
        this.RadioButton1.checked=true;
    }
    else
    {
        this.RadioButton2.checked=true;
    }
    我调试进了if里面,执行了this.RadioButton1.checked=true,可当页面加载出来,radiobutton1没有被选中,请教高人!~~
      

  2.   

    private void Form1_Load(object sender, EventArgs e)
            {
                int i = 1;
                if (i == 1)
                {
                    this.radioButton1.Checked = true;
                }
                else 
                {
                    this.radioButton2.Checked = true;
                }        }
    是这样吗?我运行了没问题