PDA

View Full Version : How to break a long text with out spaces to next line in Extjs Field label



raj542
20 Nov 2013, 1:27 AM
Hi all,

I have a field label, textfield like LONGGGGGGGGGGGGGGGGGGGGGGGGGGG: TextField value.

I want to break the long text to next line. How can i achieve this in extjs 3.4.

Thanks in advance,
Sekhi

Farish
20 Nov 2013, 3:27 AM
you should post this on ExtJS 3.x forums. In ExtJS 4, inserting an HTML break between the text causes the text to go to next line.

e.g.
fieldLabel: 'Sea<br>rch'

I would hope that it works in ExtJS 3 also.

raj542
20 Nov 2013, 10:25 PM
Thanks farish for your reply.I tried using the labelStyle for the field label, like this:

"labelStyle: "width:50;word-wrap:break-word;","

It works fine.