PDA

View Full Version : Panel background color



the_bob
27 Jul 2009, 6:27 PM
This was mentioned so many times, but I couldn't find a working solution.

Is there a way to change white background for panel and tab panel?

Bob

danh2000
27 Jul 2009, 6:40 PM
Assuming that you are using 3, either set the bodyCssClass on individual Panels or just provide your own CSS file to override globally.

mjlecomte
27 Jul 2009, 6:42 PM
per instance:


new Ext.Panel({
width:200,
height:200,
bodyStyle:{"background-color":"red"},
renderTo: document.body
});


or alter the class:

.x-panel-body{
background-color: blue
}

or add your own class (cls) to make it more reusable

the_bob
27 Jul 2009, 8:09 PM
I tried with the x-panel-body (and x-tab-panel-body since I'm using tab panel) without success.

Does it make any difference if the panel is loaded into the window?

Animal
27 Jul 2009, 9:22 PM
configure with baseCls: 'x-plain'