Help with / Tutorial for Styling for GWT Beginners
I am new to GWT and am having a hard time finding any good tutorials focused especially on teaching styling with GWT. The few examples I've found provided by Google are rather paltry, and don't really explain much.
Some things I'm trying to do would be:
- Change the global font style
- Change existing widgets' styling, such as the background color of a selected item in a CellTree
- Replace a button's text with an image instead
- Remove borders of text fields
- the list goes on
I've been searching and searching, and am not finding anything particularly helpful with styling, so any advice/direction would be greatl开发者_开发技巧y appreciated! Thank you!
Styling in GWT is done almost entirely with CSS. You can link an ordinary CSS file to your host html, as you would with a normal website, and its rules will apply just as normal CSS does with normal HTML. GWT provides a couple of ways to optimize your CSS, and that gets pretty complicated, but at a basic level you can just use Firebug to look at the HTML of your app, figure out what CSS you need from that, and throw it in your css file. GWT applies many special styles to the widgets that come built-in, and you can learn all of those style names from the generated HTML and the documentation.
精彩评论