John
John

Reputation: 838

How to make text on disabled textfield clear

I created a form using extjs4 where there are some textfields. I wonder if is it possible to make the text inside the textfields more "black" or clear when the textfield is disabled? And if it is possible, how do I do it? I searched the api but I can't seem to find the answer. When it is disabled, I cant hardly read the text inside it.

Upvotes: 0

Views: 545

Answers (1)

CD..
CD..

Reputation: 74166

Disabled fields get the x-item-disabled class added (you can change it by passing disabledCls).
You can change it in your theme (_core.scss) or css.

For example: http://jsfiddle.net/8mjvg/1/

.x-item-disabled {
    .-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
    .filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
    opacity: 0.8;
}  

.x-item-disabled .x-form-field {
    color: red;
}

Alternatively, you can use the disable & enable events to change the field style.

Upvotes: 4

Related Questions