难题!!如何在panel容器内动态增加几个TEXTBOX?? 同题,高手们如何解决 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 TextBox newTxt = new TextBox(); newTxt.ID = "textbox3"; newTxt.Width = 100; newTxt.Style.Add("LEFT","50px") newTxt.Style.Add("TOP","100px"); Panel1.Controls[1].Controls.Add(newTxt); TextBox text1 = New TextBox();text1.Text = "haha";this.Panel1.Controls.Add(text1);着样就可以了``` TextBox txt1=new TextBox();txt1.ID="Newtxt1";///设置tx1d的IDPanel1.Controls.Add(txt1); this.panel1 = new System.Windows.Forms.Panel(); this.textBox2 = new System.Windows.Forms.TextBox(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // panel1 // this.panel1.Controls.Add(this.textBox2); this.panel1.Location = new System.Drawing.Point(24, 72); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(248, 168); this.panel1.TabIndex = 1; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(152, 72); this.textBox2.Name = "textBox2"; this.textBox2.TabIndex = 0; this.textBox2.Text = "textBox2"; 前面我贴的那个是asp.net的,winform本质上一样,只是几个属性不同TextBox newTxt = new TextBox(); newTxt.Name = "textbox3"; newTxt.Width = 100; panel.Controls.Add(newTxt); TextBox newTxt = new TextBox();newTxt.ID = "textbox1";Panel1.Controls.Controls.Add(newTxt); c# 如何取得出错行的行数 【讨论】SQL2005数据分页的几种方式效率问题 如何在C#中接受ENTER指令 在VS2005中使用拖放数据源的方法可以创建Dataset和绑定到界面,如果。。。 朋友来看看,很简单。。。 使用委托怎么分离接口!! 送分问题 帮忙,有分,谢谢,急!!! 急寻.NET程序开发人员(有一定经验,北京,) 紧急求救——有关数据窗口 关于类生成器和数据读写生成器的??? 线程见消息传输
newTxt.ID = "textbox3";
newTxt.Width = 100;
newTxt.Style.Add("LEFT","50px")
newTxt.Style.Add("TOP","100px");
Panel1.Controls[1].Controls.Add(newTxt);
text1.Text = "haha";
this.Panel1.Controls.Add(text1);
着样就可以了```
txt1.ID="Newtxt1";///设置tx1d的ID
Panel1.Controls.Add(txt1);
this.textBox2 = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.textBox2);
this.panel1.Location = new System.Drawing.Point(24, 72);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(248, 168);
this.panel1.TabIndex = 1;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(152, 72);
this.textBox2.Name = "textBox2";
this.textBox2.TabIndex = 0;
this.textBox2.Text = "textBox2";
TextBox newTxt = new TextBox();
newTxt.Name = "textbox3";
newTxt.Width = 100;
panel.Controls.Add(newTxt);
newTxt.ID = "textbox1";
Panel1.Controls.Controls.Add(newTxt);