PDA

View Full Version : Why doesn't setStyleAttribute work?



edfimasa
25 Nov 2008, 1:44 AM
Hi.

Why doesn't this work?

menuDown is a VerticalPanel.


menuDown.setStyleAttribute("background-color", "red");

Shouldn't this make the panel background red?


Cheers.

fother
25 Nov 2008, 2:43 AM
use backgroundColor

edfimasa
25 Nov 2008, 2:50 AM
Thank you, it worked.

But isn't suppose to use css style? How can i know the name of the styles gxt uses then in setAttributeStyle?

Cheers.

fother
25 Nov 2008, 3:01 AM
http://codepunk.hardwar.org.uk/css2js.htm because the style attribute is set by javascript.

edfimasa
25 Nov 2008, 4:01 AM
Ok, got it. Thanks.