views:

25

answers:

2

Hey: i am very new to windows form UI development. now i am just doing all the drop and drop for UI design. but the problem is that all my UI elements are fixed size. when i maximum the window. the window gets bigger but all the UI elements in the window stays in the same size, and it looks awkward. is there a property could be set so that all the element's size is proportional resized as window get maximized?

Thanks

A: 

Use the Anchor property of the control.

Peanut
thanks it worksi will accept your answer.
Grey
no probs - I'm glad it helped
Peanut
A: 

I am assuming you want like TextBox and similar controls to grow with the window size?

If so the just set the Anchor property on the control and make sure you anchor to both left and right if you want it to expand horizontally and top and bottom for vertically.

Also, make sure to set the MinimumSize property on the controls or else set a min size for you form.

Kelsey
thank you it is very helpful
Grey