为什么CheckBox只能控制Panel控件的显示,不能控制它的隐藏呢?

来源:互联网 发布:免费发手机短信的软件 编辑:程序博客网 时间:2024/05/01 06:50

为什么CheckBox只能控制Panel控件的显示,不能控制它的隐藏呢?


原因:
private void CheckBox1_CheckedChanged(object sender, System.EventArgs e)
  {
   if( this.CheckBox1.Checked == (这里少了一个等于号)true)
   {
    this.Panel1.Visible=true;
   }
   else
   {
     this.Panel1.Visible=false;
   }
  }
 

原创粉丝点击