110,499
社区成员
发帖
与我相关
我的任务
分享
private void button1_Click(object sender, EventArgs e)
{
panel1.AutoScroll = true;
panel1.Controls.Clear();
int py = 10;
for (int i = 0; i < 1000; i++)
{
Label lb = new Label();
py = 40 * i;
lb.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
lb.Location = new System.Drawing.Point(8, py);
lb.Name = "label11";
lb.Size = new System.Drawing.Size(446, 40);
lb.Text = (i + 1) + "、选择题(每小题1分,共40分)";
this.panel1.Controls.Add(lb);
}
// this.panel1.ResumeLayout(false);
}