问题描述
我正在尝试使用FlowLayoutPanel控件,它可以很好地满足我的需求,但我需要更改它如何布局子控件(在我的情况下是按钮)。
现在,面板上的每个按钮之间都有空格,我想让它们彼此相邻放置(按钮之间没有空格,无论是左右还是上下)。基本上我有多达90个这样的按钮排列在左右和上下的不同顺序,我想基本上坐在网格上。
我不是能够通过我的谷歌搜索找出如何做到这一点。
有人能告诉我怎么样吗?
谢谢!
I am trying to use a FlowLayoutPanel control, and it works pretty well for what I want, but I need to change how it lays out the child controls (buttons in my case).
Right now, there are spaces between each button on the panel, and I want it to lay them out right next to each other (no space between buttons, either left-right or top-bottom). Basically I have up to 90 of these buttons arranged in different orders of left-right and top-bottom that I want basically sitting like a grid.
I wasn't able to figure out how to do this using my Google searches.
Can someone show me how?
Thanks!
推荐答案
Button btn = new Button();
btn.Size = new Size(200, 30);
btn.Margin = Padding.Empty;
Alan。
Alan.
这篇关于FlowLayoutPanel儿童控制安排?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!