Search

Sunday, September 29, 2013
0 comments

How to use Anchor property of control in windows form

11:33 PMSunday, September 29, 2013
Anchoring is one of the ways that WinForms provides for automatic layout control of your forms and the controls contained therein. By default, all controls are anchored to the upper-left, so that as the form is resized and moved, all controls are kept at their position relative to the upper-left corner of the form. However, in this case, we'd clearly like to have the text box controls widen or narrow as the form is resized. 

Without set right edge in anchor property

How to use Anchor property of control in windows form
Before Re-sizing

How to use Anchor property of control in windows form
After Re-sizing
To change the text boxes so that they anchor to the right edge as well as the top and left edges is a matter of clicking on the anchor rectangle on the right and changing the Anchor property to Top, Left, Right.

Set Top, Left and Right edge in anchor property

How to use Anchor property of control in windows form
Before Re-sizing
After set
How to use Anchor property of control in windows form

How to use Anchor property of control in windows form
After set re-sizing property
Protected by Copyscape Online Copyright Protection Software

0 comments :

Post a Comment

 
Toggle Footer
Top