PDA

View Full Version : Newline in label



Gunmen
28 Jun 2008, 10:42 AM
How can I add a newline in a label text?

I tried <br>, but this did not help.

Thanks!

para
28 Jun 2008, 12:46 PM
It just printed the <br> in the label, right?
Try escaping it... &lt;br&gt;

Gunmen
28 Jun 2008, 1:24 PM
It just printed the <br> in the label, right?
Try escaping it... &lt;br&gt;

Yes, but this also does not work. :s

para
28 Jun 2008, 4:20 PM
On a form field's fieldLabel?
I just tried <br> on a fieldLabel and it worked...

show code?

Gunmen
29 Jun 2008, 8:05 AM
On a form field's fieldLabel?
I just tried <br> on a fieldLabel and it worked...

show code?

Correct, on a form panel. Just a label...

items:[{
xtype:'label',
text:'Here the text on two lines.'
},{

Gunmen
2 Jul 2008, 8:24 AM
Any ideas?

pulporitmo
27 May 2009, 2:02 AM
Try using property 'html' instead of 'text'. Then you'll be able to use html tags, like <br/>