Add two labels to this web project. Set the width to 125. Set the text to one label as “TV 1 (Sports Desk)”. Set the second label to “Sports Ceiling 41.”
Now create a style. In this style make the font size 105%. Make the font style bold.
Now run the project. The labels will show the following texts:
TV1 (Sports
Sports Ceiling 41
So why does the first label only display 11 characters and the second all 17? Should the text rendering not take up the entire allocated width of the control? If I remove the “(” and “)” from the first label - it shows fine. If I remove the bold font property it works fine too.
Do the parenthesis take up that much extra room in the rendering?
I have followed your instructions (on a Mac) and do not get quite the same results you describe, the text you are using is just too big for the label widths, even when I remove the parenthesis. The text rendering is simply taking up the size of the control allocated to text display. Of course, the text width will be smaller if the font is not bold so it may fit. Try a different font, use 100%, don’t use bold, or make the labels wider.
I have followed your instructions (on a Mac) and do not get quite the same results you describe, the text you are using is just too big for the label widths, even when I remove the parenthesis. The text rendering is simply taking up the size of the control allocated to text display. Of course, the text width will be smaller if the font is not bold so it may fit. Try a different font, use 100%, don’t use bold, or make the labels wider.[/quote]
Well, that’s interesting because I am running on a Mac. And I’ve seen it with Safari and Chrome. It’s surprising you are not seeing exactly the same thing…
Ah. Yes, that would be it. It’s wrapping and I thought it was truncating which is why I couldn’t figure it out. I thought in a single line label that it would simply display as many characters as possible and then truncate those which aren’t. Instead it’s word wrapping.