PDA

View Full Version : Default font type/size in formPanel



Gery
30 Sep 2012, 1:32 PM
Hello,

I was wondering which is the default font type and font size for the formPanel labels, any help is appreciated.

Thanks in advance,

Gery

sword-it
30 Sep 2012, 10:38 PM
Hi Gerry,

The default style of the form panel label is -


.x-form-item-label {
-moz-user-select: -moz-none;
cursor: default;
float: left;
font-size: 12px;
padding: 3px 0 0;
position: relative;
z-index: 2;


}


You can use labelStyle config of formPanel item to give css style to the relative item label like-



newExt.FormPanel({
height:100,
renderTo:Ext.getBody (http://docs.sencha.com/ext-js/3-4/#!/api/Ext-method-getBody)(),
items:[{
xtype:'textfield',
fieldLabel:'Name',
labelStyle:'font-weight:bold;font-size:14px;color:blue;'
}]
});
For more info read API docs - http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.FormPanel-cfg-labelStyle

Gery
30 Sep 2012, 11:11 PM
thanks a lot sword-it for your reply! and what is the default font-family type? arial? I think the font-family type is the same for all the components, is that right?

willigogs
30 Sep 2012, 11:18 PM
thanks a lot sword-it for your reply! and what is the default font-family type? arial? I think the font-family type is the same for all the components, is that right?

The default font family in Ext-all.css is Tahoma, but you can overwrite this very simply by adding a line of your own CSS to overwrite this...

Gery
1 Oct 2012, 12:15 AM
cool! thanks a lot willigogs!