View Full Version : Unable to set background on panel
cdasher
2 May 2008, 11:13 AM
1.0-beta2
...
ContentPanel panel = new ContentPanel();
panel.setStyleAttribute("background","#000000");
...
The background is never set. I also tried setting primary style attribute and using CSS to change background
and the style is never added.
darrellmeyer
2 May 2008, 1:12 PM
Please review the components javadocs before posting something as a bug. Moving this post to help.
panel.setBodyStyle("backgoundColor:white;");
Payam
27 Jun 2008, 7:21 PM
Thank god I ran into this post.
I was going nuts how to set the background color.
There needs to be more CSS examples.
In CSS it is "background-color" but here it is "backgroundColor".
For a Swing developer with minimal web development, its really hard to pick things up.
So as a general question,
whenever I see a attribute with a dash (eg. background-color), do I convert it to camel casing (eg. backgroundColor)?
gslender
27 Jun 2008, 10:01 PM
So as a general question,
whenever I see a attribute with a dash (eg. background-color), do I convert it to camel casing (eg. backgroundColor)?
yeppers
Payam
28 Jun 2008, 2:08 AM
Thanks! :)
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.