[英]How can I keep Buttons at the same position below a TableLayoutPanel?
In C#, how is the best way to position 2 Buttons
at the same distance below a TableLayoutPanel
when a Form
is resized as well as the same distance from the right of the Form
? 在C#中,当调整Form
大小以及与Form
右侧的距离相同时,将2个Buttons
定位在TableLayoutPanel
下方相同距离处的最佳方法是什么?
Here is an image: 这是一张图片:
The TableLayoutPanel
has the Anchor
set to Top, Bottom, Left, Right
. TableLayoutPanel
的Anchor
设置为Top, Bottom, Left, Right
。
Is there a specific Form Control
that I should use, or does this need to be done via code in the Form's
resize event? 我是否应该使用特定的Form Control
,还是需要通过Form's
resize事件中的代码来完成此操作?
如果面板正在拉伸(锚点: Left, Right, Bottom, Top
),则应将按钮的锚点设置为“ Bottom, Right
以便在调整窗体大小时基本上保持在同一位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.