private void flowLayoutPanel1_Resize(object sender, EventArgs e) { foreach (Button button in flowLayoutPanel1.Controls) { button.Width = flowLayoutPanel1.Width - 5; } }