FlowLayoutPanel 会控制动态生成控件之间的间距吗
private void InstallSymbol()
{
flowLayoutPanel1.Controls.Clear();
for(int i = 0; i < 50;i++)
{
Label pLabel = new Label();
pLabel.Width = 30;
pLabel.Height = 30;
pLabel.BackColor = Color.White;
pLabel.Text = i.ToString();
pLabel.Margin = new Padding(0);
pLabel.TextAlign = ContentAlignment.MiddleCenter;
pLabel.BorderStyle = BorderStyle.FixedSingle;
pLabel.FlatStyle = FlatStyle.Standard;
flowLayoutPanel1.Controls.Add(pLabel);
}
}
浙公网安备 33010602011771号