简体   繁体   中英

How to make button fit the form when resizing it (C#)

This is testing form 在此处输入图片说明

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.

I want to make something like constraint to right and bottom edge of the form in android. So that on resizing form my button is placed in right position- 50px from bottom and 35px from right.

I tried with dock property , but when i set it to right, button gets height of form , thats not excatly what i want.
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

When i resize it to 500x500 i want to look like this 在此处输入图片说明
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

Use anchor to Right, Bottom to make it adjustable when you resize the form.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM