
C# flowLayoutPanel 控件 的问题、
我用循环向flowLayoutPanel中添加控件while(inti=0;i<10;i++){PictureBoxpicture=newPictureBox();pic...
我用循环向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的图片,该怎么更改呀?
我用this.flowLayoutPanel1.Controls[2]. 打点并没有Image 属性呀
我没分了,高人指点下呀!拜托了 展开
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的图片,该怎么更改呀?
我用this.flowLayoutPanel1.Controls[2]. 打点并没有Image 属性呀
我没分了,高人指点下呀!拜托了 展开
2个回答
展开全部
((PictureBox)this.flowLayoutPanel1.Controls[2]).Image = ...
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询