日期:2014-05-17  浏览次数:20946 次

为什么radioButton的checked属性赋值为true,页面中不选中
我winForm界面里有一个RadioButton,我在后台代码里this.RadioButton1.checked=true;
但是每次打开界面的时候还是没选中,请问是为什么?
------最佳解决方案--------------------
可以啊
------其他解决方案--------------------
private void Form1_Load(object sender, EventArgs e)
        {
            int i = 1;
            if (i == 1)
            {
                this.radioButton1.Checked = true;
            }
            else 
            {
                this.radioButton2.Checked = true;
            }

        }
是这样吗?我运行了没问题
------其他解决方案--------------------
我这里有两个radioButton,我做了一个判断
if(.....)
{
    this.RadioButton1.checked=true;
}
else
{
    this.RadioButton2.checked=true;
}
我调试进了if里面,执行了this.RadioButton1.checked=true,可当页面加载出来,radiobutton1没有被选中,请教高人!~~
------其他解决方案--------------------
是不是在页面加载的时候又刷新了一遍?
------其他解决方案--------------------
亲,你现在会了吗?我也有这个问题不会啊