C#动态生成自定义控件速度好慢,怎么解决啊
privatevoidDisplayPatient(stringid,stringname,stringsex,stringdateofbirth){for(inti=0...
private void DisplayPatient(string id,string name,string sex,string dateofbirth)
{
for (int i=0;i<20; i++)
{
UserControl1 u = new UserControl1();
u.lbid = id+i;
u.lbname = name;
u.lbsex = sex;
u.lbdateofbirth = dateofbirth;
flpShowPatient.Controls.Add(u);
}
} 展开
{
for (int i=0;i<20; i++)
{
UserControl1 u = new UserControl1();
u.lbid = id+i;
u.lbname = name;
u.lbsex = sex;
u.lbdateofbirth = dateofbirth;
flpShowPatient.Controls.Add(u);
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询