Reputation: 11
I want to add background color to label in EXTjs. Could anyone help? Thanks in advance.
Upvotes: 1
Views: 6831
Reputation: 13489
Use the style config option :
{
xtype: 'label',
style: {
background: 'red'
}
}
labelStyle only works for using things like textfields
Upvotes: 1
Reputation: 22386
You can use field's labelStyle config:
{
xtype: 'textfield',
name: 'email',
fieldLabel: 'Email Address',
labelStyle: 'background-color: #f00;'
}
P.S. There is also labelCssExtra config which you can use. But I couldn't get it to work in ExtJS4.0.2a.
Upvotes: 1