点击一个button按钮,增加一行,含有dropdownList、TextBox控件,急急急!!请给出代码!!
展开全部
在button的click里写这几句
TextBox textBox1 = new TextBox() ;
textBox1.Location = new System.Drawing.Point(84, 237);
textBox1.Name = "textBox1";
textBox1.Size = new System.Drawing.Size(100, 21);
textBox1.TabIndex = 3;
DropdownList dropdownList1 = new DropdownList ();
dropdownList1.FormattingEnabled = true;
dropdownList1.Location = new System.Drawing.Point(64, 105);
dropdownList1.Name = "dropdownList1";
dropdownList1.Size = new System.Drawing.Size(120, 88);
dropdownList1.TabIndex = 2;
this.Controls.Add(dropdownList1);
this.Controls.Add(textBox1);
TextBox textBox1 = new TextBox() ;
textBox1.Location = new System.Drawing.Point(84, 237);
textBox1.Name = "textBox1";
textBox1.Size = new System.Drawing.Size(100, 21);
textBox1.TabIndex = 3;
DropdownList dropdownList1 = new DropdownList ();
dropdownList1.FormattingEnabled = true;
dropdownList1.Location = new System.Drawing.Point(64, 105);
dropdownList1.Name = "dropdownList1";
dropdownList1.Size = new System.Drawing.Size(120, 88);
dropdownList1.TabIndex = 2;
this.Controls.Add(dropdownList1);
this.Controls.Add(textBox1);
追问
请问需要导入什么命名空间,我的这Location,Name,Size都报错
追答
using System.Windows.Forms;
展开全部
-----看看你缺哪个
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在那个里面增加行 gridview 还是 datagridview
简单的说是 B/S 还是 C/S
简单的说是 B/S 还是 C/S
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询