开发者

Changing a single element of the widget style

开发者 https://www.devze.com 2023-03-21 03:26 出处:网络
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 g

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

精彩评论

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

关注公众号