R Ryu Oct 15, 2004 #1 Is there a way to dynamically controls like the Placeholder in ASP.Net in a Window App?
A Arne Janning Oct 15, 2004 #2 Ryu said: Is there a way to dynamically controls like the Placeholder in ASP.Net in a Window App? Click to expand... System.Windows.Forms.Panel is a "placeholder"-control. Adding controls is trivial: Panel pnl = new Panel(); //set width, height, position, etc left out here myForm.Controls.Add(pnl) Button btn = new Button() //set width, height, position, etc left out here pnl.Controls.Add(btn) Cheers Arne Janning
Ryu said: Is there a way to dynamically controls like the Placeholder in ASP.Net in a Window App? Click to expand... System.Windows.Forms.Panel is a "placeholder"-control. Adding controls is trivial: Panel pnl = new Panel(); //set width, height, position, etc left out here myForm.Controls.Add(pnl) Button btn = new Button() //set width, height, position, etc left out here pnl.Controls.Add(btn) Cheers Arne Janning
I Ignacio Machin \( .NET/ C# MVP \) Oct 15, 2004 #4 Hi, Just remember that you have to recreate the controls in the postback if you want to be able to access them in the page. Cheers,
Hi, Just remember that you have to recreate the controls in the postback if you want to be able to access them in the page. Cheers,
A Arne Janning Oct 15, 2004 #5 Hi Ignacio! Just remember that you have to recreate the controls in the postback if you want to be able to access them in the page. Click to expand... we were talking about Windows.Forms! Cheers Arne Janning
Hi Ignacio! Just remember that you have to recreate the controls in the postback if you want to be able to access them in the page. Click to expand... we were talking about Windows.Forms! Cheers Arne Janning