0
我有了一個flowLayoutpanel1
我把一些小程序OD fynamically創建的標籤在它像這樣:確定動態標籤間距
,但我想這些標籤有某種差距彼此之間所以他們不感動 和lbl.SetBounds();
似乎並沒有在這裏工作。
這是我正在測試的代碼?
flowLayoutPanel1.Controls.Clear();
int length = 9;
for (int i = 0; i < length; i++)
{
Label lbl = new Label();
lbl.Name = i.ToString();
lbl.Text = "Label " + i.ToString();
lbl.AutoSize = true;
lbl.Font = new Font("Ariel", 10);
lbl.SetBounds(0, 20, 70, 70);
lbl.BorderStyle = BorderStyle.FixedSingle;
flowLayoutPanel1.Controls.Add(lbl);
}
有關如何獲得間距的任何建議?