PDA

View Full Version : ContentPanel background color



mysticav
10 Mar 2007, 9:39 AM
new Ext.ContentPanel('south', {title: 'MyPanel', closable: true});

How to change the contentPanel background color ?

tryanDLS
10 Mar 2007, 10:50 AM
You can either look at the generated HTML to determine what CSS class is applied to the element and ad an override for the entry, or get a ref to the CPs Element object and then setStyle or addClass


var cp = new Ext.ContentPanel(....);
cp.getEl().setStyle('backgroundColor', 'yellow');
// or
cp.getEl().addClass('mynewCSSclass'); // assuming you added a CSS entry to your page