One of the issues with label in windows forms programming is if you set the label to AutoSize, it will automatically grow with whatever text you put in it.
If you want to make it word wrap at a particular width, you can set the MaximumSize propery.
label.MaximumSize = new Size(50, 0);
label.AutoSize = true;
If you have the label snap into it's container, you can switch off AutoSize, leave the max size property as it is, and it will word-wrap exactly as we want.
- Advertisement -
- Advertisement -