怎么取到flowLayoutPanel1中的控件的值,下面这个好像不行
string s="";
foreach (Control c in flowLayoutPanel1.Controls)
{
if (c is System.Windows.Forms.TextBox) //每次都是false
s += c.Text;
}
ps: 前面是向flowLayoutPanel1里动态添加控件.
谢谢了~~
...全文
764打赏收藏
新手,请教~~~ C# winform
怎么取到flowLayoutPanel1中的控件的值,下面这个好像不行 string s=""; foreach (Control c in flowLayoutPanel1.Controls) { if (c is System.Windows.Forms.TextBox) //每次都是false s += c.Text; } ps: 前面是向flowLayoutPanel1里动态添加控件. 谢谢了~~
[Quote=引用楼主 zwf0731 的帖子:]
怎么取到flowLayoutPanel1中的控件的值,下面这个好像不行
string s="";
foreach (Control c in flowLayoutPanel1.Controls)
{
if (c is System.Windows.Forms.TextBox) //每次都是false
s += c.Text;