如何使两个元素对称?

时间:2019-07-24 05:46:49

标签: c# winforms user-interface margin

我正在设计一个GUI并尝试添加两个Button。面板的右侧。另外一个在面板的左侧。而且它们应该是对称的。
当我更改边距表单属性时,没有任何变化。
我的意思是左Button的左边距和Right Button的右边距应该相等。

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以使用TableLayoutPanel控件。 其中two coulmns的列的值为percent。 并将pictureboxes添加到TableLayoutPanel's cells,然后将Dock property中的pictureboxes设置为Fill