Abhishek
Abhishek

Reputation: 2034

Scale the size of windows form and it's control

I am working on a windows form application where I want my windows form to scale as I grow the size of the form. For instance, The tool so far I developed

What I want here is when the user resizes it to bigger size, the controls should also resize with it. What's happening now is: enter image description here

Can anyone please suggest a way to achieve it? Thanks in advance!

Upvotes: 0

Views: 1122

Answers (1)

Sascha
Sascha

Reputation: 1218

Please take a look at the Anchor-Property. What you want to do is achor the textboxes left, right and top. The elipsis-Buttons and compare button should be anchored top right. The large textbox should be anchored to all sides. And so on.

You won't need docking. If you also want to support environments with large fonts (larger dpi) you should use a table layout contron instead. In that case forget about the Anchors and set every Docking-property to fill.

Upvotes: 4

Related Questions