我已经使用 c# 以 Windows 形式动态创建了 flowlayoutpanel。我在该面板中添加了一个按钮。谁能告诉我如何在按下按钮后动态删除该面板?这是编码:
FlowLayoutPanel[] flws ;
Button[] butns ;
for ( int i=0; i<3; i++)
{
flws[i] = new FlowLayoutPanel();
flws[i].Name = "flw" + i;
flws[i].Location = new Point(3,brh);
flws[i].Size = new Size(317,122);
flws[i].BackColor = Color.DarkCyan;
flws[i].BorderStyle = BorderStyle.Fixed3D;
butns[i] = new Button();
butns[i].Click += new EventHandler(butns_Click);
butns[i].Text = "submit";
butns[i].Name = "but" + i;
butns[i].Location = new Point(1100, 186 + brh);
flws[i].Controls.Add(butns[i]);
}