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 = ...

posted on 2012-11-21 18:05  武胜-阿伟  阅读(7759)  评论(0编辑  收藏  举报