I want to add an object of these class:
public class OptiePanel : System.Windows. Forms.Control
When I add an object called panelke (in the Form1 class), it doesn't add the
panelke and its buttons, labels :-( What should I change about this code?
(some code from the Form1 class)
OptiePanel panelke=new OptiePanel();
panelke.Locatio n = new System.Drawing. Point(300, 300);
this.Controls.A dd(panelke);
panelke.Visible =true;
(some code from the OptiePanel class)
this.Controls.A dd(labelHoofd);
this.Controls.A dd(labelHoofd);
this.Controls.A dd(labelH);
this.Controls.A dd(labelV);
this.Controls.A dd(button);
this.Controls.A dd(textBoxH);
this.Controls.A dd(textBoxV);
Greetz
JC
public class OptiePanel : System.Windows. Forms.Control
When I add an object called panelke (in the Form1 class), it doesn't add the
panelke and its buttons, labels :-( What should I change about this code?
(some code from the Form1 class)
OptiePanel panelke=new OptiePanel();
panelke.Locatio n = new System.Drawing. Point(300, 300);
this.Controls.A dd(panelke);
panelke.Visible =true;
(some code from the OptiePanel class)
this.Controls.A dd(labelHoofd);
this.Controls.A dd(labelHoofd);
this.Controls.A dd(labelH);
this.Controls.A dd(labelV);
this.Controls.A dd(button);
this.Controls.A dd(textBoxH);
this.Controls.A dd(textBoxV);
Greetz
JC
Comment