Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to: Size a Windows Forms Label Control to Fit Its Contents

The Windows Forms Label control can be single-line or multi-line, and it can be either fixed in size or can automatically resize itself to accommodate its caption. The AutoSize property helps you size the controls to fit larger or smaller captions, which is particularly useful if the caption will change at run time.

To make a label control resize dynamically to fit its contents

  • Set its AutoSize property to true.

If AutoSize is set to false, the words specified in the Text property will wrap to the next line if possible, but the control will not grow.

See Also

Community Additions

© 2015 Microsoft