문제

i have a css in my GWTApplication which contains several classes in that,I want to access the class attributes through my program,is there any way to access them via java code or CssResource. If there is any let me know with the sample code?

도움이 되었습니까?

해결책

One can access CSS classes through GWT code but not its class attributes through setStyleName(String) method. For example

Button button = new Button();
button.setStyleName("Stylename");

for example css of

.StyleName {
 background : #abcdef;
 }

Further you can change the value of some attributes without css like

button.setWidth("100px");
button.setHeight("20px");

다른 팁

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top