-------------------------------------------------------------------------------------------------------------------------------------
HorizontalPanel hp=new HorizontalPanel();
Label lbl=new Label("aaaaa");
hp.add(lbl);
hp.setWidth("300px");
hp.setHeight("300px");
DOM.setStyleAttribute(hp.getElement(), "backgroun-color", "red");
DOM.setStyleAttribute(hp.getElement(), "border", "1px solid red");
RootPanel.get().add(hp);
-------------------------------------------------------------------------------------------------------------------------------------
then it wongs,the developement mod console said :
java.lang.AssertionError: The style name 'background-color' should be
in camelCase format
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
It's a pain, but it's not GWT's fault.
Paul
.css({'background-color': '#ffe', 'border-left': '5px solid #ccc'}) and.css({backgroundColor: '#ffe', borderLeft: '5px solid #ccc'}). Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name. Source: http://api.jquery.com/css/