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 w开发者_Python百科indow 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
Use the Anchor property of the control.
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.
精彩评论