我怎样才能得到的WinForms一个StackPanel中样布局布局、WinForms、StackPanel

2023-09-04 23:54:08 作者:故事尾声

我创建了三个按钮的对话框。 我把这些按钮在FlowLayoutPanel中使用的FlowDirection设置为自顶向下。

I created a dialog with three buttons. I put those buttons in a FlowLayoutPanel with FlowDirection set to TopDown.

我试图大小的按钮在面板的宽度,然后设置锚点为左+前+右。这似乎已经在FlowLayoutPanel中没有任何影响。

I attempted to Size the buttons to the width of the panel and then set the Anchor to Left+Top+Right. This seems to have no effect in a FlowLayoutPanel.

有一个简单的解决办法?我知道我可以使用FlowLayoutPanel的的onResize受到事件,并转到这个方向,但希望的是设计时设置。

Is there a simple solution to this? I know I can use the FlowLayoutPanel's OnResize event, and go that direction, but was hoping for a design-time setting.

推荐答案

您可以使用的TableLayoutPanel ,如果明确的行管理不是太烦人了。

You can use the TableLayoutPanel, if the explicit row management isn't too annoying.

 
精彩推荐
图片推荐