Add panel
-
Im trying to add panel in window form by using this method. public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Panel mypanel; private void InitializeComponent() { ... this.mypanel = new System.Windows.Forms.Panel(); ... } ... ... this.Controls.Add(this.mypanel); Is there other way to display panel besides using "this.Controls.Add(this.mypanel);" method?
-
Im trying to add panel in window form by using this method. public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Panel mypanel; private void InitializeComponent() { ... this.mypanel = new System.Windows.Forms.Panel(); ... } ... ... this.Controls.Add(this.mypanel); Is there other way to display panel besides using "this.Controls.Add(this.mypanel);" method?
Yes, you can use: this.mypanel.Parent = this;
-
Yes, you can use: this.mypanel.Parent = this;
Thanks...