PDA

View Full Version : Set BackgroundImage of a Panel



Urkman
27 Jan 2010, 1:37 AM
Hello,

I try to set the BackgroundImage of a Panel using this Code:


this.getEl().setStyle( 'backgroundImage', '/images/test.jpg' );

But this is not working. Where is my error here?

Thanks for your help,
Urkman

mitchellsimoens
27 Jan 2010, 9:12 AM
If you have frame:true then you can set CSS to do it:


.x-panel-mc .x-panel-body {
background-image:url(/images/test.jpg);
}