Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# textbox

Status
Not open for further replies.

VeronicaStolin

Programmer
Oct 29, 2002
4
IL
Hello!
How can I create dynamic textbox (textbox that I will determine where to put it on the panel during run time).
 
Paste the following code to your form constructor then run it to see how to create a "dynamic" textbox and put it on a panel:

System.Windows.Forms.Panel m_Panel=new Panel();
this.Controls.Add(m_Panel);
System.Windows.Forms.TextBox m_TextBox=new TextBox();
m_Panel.Controls.Add(m_TextBox);
m_TextBox.Text = "created on fly";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top