PDA

View Full Version : disabledCls for textfield



ing.amdangelo
15 Jun 2012, 6:52 AM
DisabledCls fort textfield modify only the label and not the field ??

Why ??

scottmartin
15 Jun 2012, 9:07 AM
This disables both the label and input:



Ext.create('Ext.form.Panel', {
title: 'Contact Info',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
disabled: true,
xtype: 'textfield',
name: 'name',
fieldLabel: 'Name'
}]
});


Are you applying CSS yourself?

Scott.

ing.amdangelo
17 Jun 2012, 11:08 PM
var cmbProvince = Ext.create('Ext.form.TextField',{
id: 'provinciaNuovoEvento',
fieldLabel: 'Provincia',
labelWidth: 70,
value: provinciaAdmin,
margin: '20 0 0 0',
disabled: true,
disabledCls: 'my-item-disabled',
width: 250
});

.my-item-disabled {
color: #000 !important;
font-weight: bolder !important;
border:none;
}
36311

scottmartin
21 Jun 2012, 1:55 PM
Please try the following:



.my-item-disabled .x-form-item-label {
color: #000 !important;
font-weight: bolder !important;
border:none;
}
.my-item-disabled .x-form-field {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
opacity: 0.3;
}​


Regards,
Scott.

murrah
13 Apr 2014, 6:07 PM
Please try the following:



.my-item-disabled .x-form-item-label {
color: #000 !important;
font-weight: bolder !important;
border:none;
}
.my-item-disabled .x-form-field {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
opacity: 0.3;
}​


Regards,
Scott.

Yes, that works. Thanks. I would click yours as Best Answer if I could.

Cheers,
Murray