Reputation: 161
I have a class which extends LabelField to set font and color. I have 2 such custom LabelFields and they display some strings of text. Those Strings are rather short, about a dozen symbols long.
The problem is that these custom LabelFields enforce new lines. They break my strings and display them in 2 lines instead of only 1 (no matter if a String is 6 or 12 characters long).
How to make these LabelFields stop enforcing new lines? I need to have one line stay one line.
Update: I have found the reason of that problem. The problem was on another level, - in the process of calculation of width and height for my popup Screen which contained those LabelFields.
Upvotes: 0
Views: 275
Reputation: 2158
you can use the style LabelField.ELLIPSIS to force the single line.
like
LabelField l = new LabelField("your text",LabelField.ELLIPSIS);
Upvotes: 2