如何自动安排图片框 [英] How to arrange picturebox autometically
本文介绍了如何自动安排图片框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们,
如果我的程序中有5个图片框,现在我想以编程方式禁用1个图片框并自动重新排列其余的图片框,如何自动安排图片框.请帮助.
Hi friends,
How to arrange picture box automatically if i have 5 picture box in my program and now i want to disable 1 picture box in programmatic way and rearrange rest picture box automatically. Please help.
推荐答案
也许您可以使用 FlowLayoutPanel [ ^ ]并在其中禁用图片框时,将重新排列顺序.
Perhaps you can use a FlowLayoutPanel[^] and when you disable a picture box inside, you rearrange the order.
使用Visible
属性控制可见性,并使用Location
属性设置其位置.
UseVisible
property to control visibility and theLocation
property to set its location.
PictureBox1.Visible = true;
PictureBox1.Location = new Point(20,20);
这篇关于如何自动安排图片框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文