On Monday, January 7, 2013 1:12:36 PM UTC+1, membersound wrote:
The following Label is not bold. What am I missing here?
Many, many things.
- The default style name for a Label is gwt-Label, not gwt-label
- to turn text bold, the property to use is font-weight, not font-style
- <ui:style> is an implicit CssResource and will obfuscate the class names; you'd need an "@external gwt-Label;" line to turn obfuscation off
- but then you'd turn absolutely all Label-s of your application bold; if that's what you want, then you shouldn't do that in a <ui:style> in UiBinder, but rather in a CssResource that you inject right from your EntryPoint, or in a plain old CSS file, to make it clear (for you, when you'll get back to it a few months from now) that it's a global style.
You probably rather want to do:
<ui:style>
.foo { font-weight: bold; }
</ui:style>
<gwt:Label addStyleNames="{style.foo}">bold</gwt:Label>