[英]How to make button fit the form when resizing it (C#)
I want to make it adjustable for every size of form. 我想使其适合各种尺寸的表格。
I set anchor property to none
so that my button dont get resized itself. 我将锚属性设置为
none
以便按钮本身不会被调整大小。
I want to make something like constraint to right and bottom edge of the form in android. 我想在android中对表单的右边和底部边缘进行约束。 So that on resizing form my button is placed in right position- 50px from bottom and 35px from right.
这样,在调整大小时,我的按钮将放置在正确的位置-底部50px,右侧35px。
I tried with dock property , but when i set it to right, button gets height of form , thats not excatly what i want. 我尝试使用dock属性,但是当我将其设置为正确时,按钮的高度为form,这并不是我想要的。
Does anybody know how to solve it? 有人知道如何解决吗? I hope u understood me...
我希望你能理解我...
UPDATE 更新
As you didnt understood me let me clear this with image example. 因为您不了解我,所以让我用图像示例清除它。 U saw the my original form with a size 1000x1000
您看到了我原来的尺寸为1000x1000的表格
When i resize it to 500x500 i want to look like this 当我将其尺寸调整为500x500时,我想看起来像这样
You can see button is in same position and form is changed, with the same size, but i cant achieve that in runtime , because when i resize the form , button disapears 您可以看到按钮处于相同的位置,并且表单具有相同的大小,但是我在运行时无法实现,因为当我调整表单大小时,按钮消失了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.