c# winform 动态创建的窗口 的2个问题
动态创建了若干个textbox 和 一个 button
其中textbox 1通过读数据库(sql2000)填充text
button 1 对数据库进行了修改
要求1:希望buttong的click处理完成后 textbox 1能够重新读取新的数据
其中textbox的创建和读取是在form 的load事件里
要求2:并且希望textbox的click能够selectall
我该怎么修改或者添加代码
//code
private void Form4_test_Load(object sender, EventArgs e)
{
.
.
.
.
for(int i=0;i<count;i++)
{
TextBox t = new TextBox();
t.Text = sql_funtion(...); //数据库内容
t.AutoSize = true;
t.Name = "t" + i.ToString();
System.Drawing.Point q = new Point(140, 13 + i * 30);
t.Location = q;
panel1.Controls.Add(t);
}//end of for
}//end of load