显示用代码显示100个label控件 一行显示10个 求大神当老师
求简单的代码
Label [] lb = new Label[3000];
for(int i = 0; i < 3000; i++)
{
lb[i] = new Label();
lb[i].Location = new System.Drawing.Point( 80+12 * (i % 100),180+15 * (i / 100));
lb[i].Name = "btnTest";
lb[i].Size = new System.Drawing.Size(10, 12);
lb[i].Text = ".";
lb[i].BackColor = Color.White;
lb[i].Modifiers=public;
//lb[i].Font = new Font("微软雅黑", 30, FontStyle.Bold, GraphicsUnit.Pixel);
this.Controls.Add(lb[i]);
你参看下这个