开发者

Changing a single element of the widget style

How to chang开发者_StackOverflow社区e single element of the widget style in GWT. I would like to create new version of TextBox style, so that only the border color changed to red, for example.How to get to the style responsible for the TextBox?

I tried to create new style

.gwt-TextBox.invalid {
border-color: red;
}

but it does not work.


  1. Make sure you add class invalid to your TextBox:

    textBox.addStyleName("invalid");
    
  2. Use CssResource to associate your CSS file with GWT: http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html#cssfiles

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜