flowLayoutPanel中添加控件


循环向flowLayoutPanel中添加控件
while(int i=0;i<10;i++)
{
PictureBox picture = new PictureBox();
picture.Image = this.imageList1.Images[i];
picture.Tag = i;
this.flowLayoutPanel1.Controls.Add(picture);
}
之后我想更改某个(比如第2个)PictureBox的图片,更改

((PictureBox)this.flowLayoutPanel1.Controls[2]).Image = ...


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM