|
-
January 3rd, 2006, 08:53 AM
#1
Label Wrap
this will be a really easy question I am sure of it. I am a converting VB6 programer. I am in the process of re-writting my VB6 applications to .NET. This is my learning process. My question is in VB6 a lable could have a height & width and the text would wrap. In VB.NET the text no longer wraps. So if I have a really long name the label keeps growing.
Any Ideas on how I can get a label to have a height, width & wrap again.
Thanks for your help
-
January 3rd, 2006, 12:48 PM
#2
Re: Label Wrap
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|