Reputation: 5
I am working on project.It takes a string and display it in a label. But if the character are more.it goes on and not splitting.I want the string to split and move to next line when the characters are more. This is the output
Upvotes: 0
Views: 181
Reputation: 5
I made it working.I changed the Auto size to true and change the values of Maximum size property of the label,
Upvotes: 0
Reputation: 6111
When the Label's AutoSize
property is true
, it will automatically be resized to display its entire contents. Unfortunately, it does not care about the size limitations of the its immediate parent.
However, if you dock the Label, you should get the desired behavior you're looking for. In the Form's designer, change the AutoSize
to false
and change the Dock
property to DockStyles.Fill
.
Upvotes: 0