-------------------------往Panel里面添加文本框和按钮-------------------------------
int textNum
int btnNum
textNum=Convert.ToInt32(this.TextBox1.Text);
btnNum=Convert.ToInt32(this.TextBox2.Text);
for(int i=0;i<textNum;i++)
{
this.Panel1.Controls.Add(new TextBox());
}
for(int j=0;j<btnNum;j++)
{
this.Panel1.Controls.Add(new Button());
}
-------------------------日历中选择的数进行显示-------------------------------
this.Label1.Text=this.Calendar.SelectedDate.ToShortDateString();
-------------------------控制Panel的隐藏与显示----------------------------------
this.Panel1.Visible=false;
this.Panel1.Visible=false;
//按钮1
this.Panel1.Visible=true;
this.Panel2.Visible=false;
//按钮2
this.Panel1.Visible=false;
this.Panel2.Visible=true;
···
···