PDA

View Full Version : How to set displayfield font



theRedPill
20 Jul 2015, 4:15 PM
Hello,

I'm using a displayfield to show a message via a big block of text and I'm trying to figure out how to change the font from the default to Courier New.

Does anyone know how to do this?

scottmartin
20 Jul 2015, 6:33 PM
You can use the following:


.x-form-item-label {
color: red;
font-family: tahoma, arial, verdana, sans-serif;
font-size: 25px;
}


Scott,

theRedPill
21 Jul 2015, 7:41 AM
Is that a css entry that overrides the field's label? I don't want to change the label's font, I want to change the font of the field that's displayed after using the field's setValue() method.

scottmartin
21 Jul 2015, 8:57 AM
For the field itself, then use:



.x-form-display-field {
color: blue;
font-family: tahoma, arial, verdana, sans-serif;
font-size: 35px;
}


If you use dev tools in your browser, you can hover over any element and find the style used so you can see what needs to be changed.

Scott.

theRedPill
21 Jul 2015, 9:50 AM
Alright thanks Scott!