PDA

View Full Version : set background color for panel



mxu
22 Nov 2007, 1:39 AM
a panel is dynamically created with html : '<div id="dynamic-divID"></div>'.
then a html content w/ js is loaded onto this div. but the backgournd color of the paenl
and this div is the same as the theme color blue. how can I ser the panel background color
to white or other color (also other visual characteristics ) ?

var dynamic-divID = '...';
var id2use = '...';
...
p = new Ext.Panel({
...
html : dynamic-divID ,
id: id2use ,
...
});

//dynamically load html content by
var el = Ext.get(divID);
el.update(htmContent-with-jsl, true);
...
// when i used p.body.load(url...), the backgournd is none or white
// but when using el.update(htmContent-with-jsl, true);,
//the panel's background color become the theme color (blue)

tryanDLS
22 Nov 2007, 8:57 AM
panel.body.setStyle('background-color', 'yellow')