1

I'm very confused. I've created a global variable:

public LabelField title2 = new LabelField("", 
    LabelField.ELLIPSIS | DrawStyle.HCENTER| LabelField.USE_ALL_WIDTH |
    Field.FIELD_VCENTER | LabelField.USE_ALL_HEIGHT);

...

title2.setText("blablablablablabla\nblablabalba");

But when i'm trying to show this text on device's display i see only one line instead of two.

enter image description here

but if i'm using

add(new LabelField("Line1\nLine2"));

it works properly. Does anyone have a solution?

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
Alexey
  • 17
  • 3

2 Answers2

3

Can you try skipping LabelField.ELLIPSIS to see if that makes any difference?

Bala R
  • 107,317
  • 23
  • 199
  • 210
1

\n NEWLINE characters are not supported in LabelFields on OS 4.5.

They are supported in OS 5.0.

I do not have 4.6 & 4.7 environments setup on my machine to test with.


I just wanted to update this page for future search purposes, since I had the same problem as original poster and his answer was not working for me.

Richard Le Mesurier
  • 29,432
  • 22
  • 140
  • 255