PDA

View Full Version : Custom xtype:label wraps a text



maestrokame
24 Mar 2011, 6:46 AM
Hi. I really need to create a label with custom width. The problem is that 'label width' wraps a text.

I think that it must be possible to do this (for some reason width propertie must be in the API Documentation).


items :
[
{ xtype: 'label', text: 'dasda', width: 100, autoWidth :false, boxMinWidth: 100,boxMaxWidth:100},
{ xtype: 'textfield', id: 'Username', width: 50}
]

varunach
24 Mar 2011, 11:41 AM
if you only need to increase the width of the label then you can try the config

anchor : '-20'But if your actually trying (if i understood it correctly) to increase the width of the label beside a textfield then first of all you've got the config wrong. It should be:



{
xtype : 'textfield'
fieldLabel: 'username'
labelStyle : //whatever style that you want to specify.. e.g. width:100px;
}