Removing dynamic controls from panel

前端 未结 5 1441
既然无缘
既然无缘 2020-12-03 20:42

I have dynamically generated controls on the panels of windows form and i have also generated a button for removing the controls, all in rows.

int c = 0;
pri         


        
5条回答
  •  鱼传尺愫
    2020-12-03 21:39

    If all of your controls that you want to delete are in a Panel, you can do: panel.Controls.Clear(); That clears all controls form your panel.

提交回复
热议问题