PDA

View Full Version : Style of text in a Button



lucia_mgv
16 Nov 2010, 4:02 AM
Hi,

I am trying to change the style of a Button and I also want to change the type of font and color of the text in the Button. There isn't any property for that so I am specifing the style in the Button style property:



var Login=new Ext.Button({
id:'Login',
width:130,
height:24,
text:'Entrar',
style:'margin-left:auto;background-color:#e1eafb;color:Black;border:1px solid #83a6e0;font-family:Verdana;font-size:8.25pt;'
});

var LoginContainer$1=new Ext.Container({
id:'LoginContainer$1',
layout:'form',
items:[AvantiaLogo,DataCNT,Login]
});
The border and background-color is rendering correctly but not the font-size and family. I think that the browser is rendering a default style for buttons.

Can anyone help me??

laurentParis
16 Nov 2010, 8:55 AM
use css to do that !

set property cls for your button
example:


var Login=new Ext.Button({
id:'Login',
cls: 'myButton',...


and declare this css :


.myButton button {color: black;font-family:Verdana;font-size:8.25pt;}