I need to dynamically duplicate a Panel with all the controls within it according to the checkboxes. (If check-box is checked another panel appears).
Finally, when I click Calculate it's doing the same pre-defined action for each panel that created.
Picture to understand:

Can someone tell me how to do that?
Put the controls you want into a UserControl.
When a checkbox is checked, created an instance of that control and add it.
MyPanel myPanel = new MyPanel();
myPanel.Location = new Point(25,25);
this.Controls.Add (myPanel);
Location is where you want it in your form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With