FieldLabel.setStyleName causes the corresponding widget to be misaligned
I have a FieldLabel and I want to set the style to be bold. However, when I call setStyleName, the corresponding widget gets moved down a line so it isn't aligned with the field label:
So this code:
FieldLabel name = new FieldLabel();
TextField nameFld = new TextField();
nameFld.setEmptyText(""Enter your name...");
Looks like this:
Doing things such as:
keeps the alignment, but it results in the style not getting recognized and displays in plain text.
Has anyone seen this or figured out a workaround? If I set the style to something different, such as changing the color to red, the addStyleName works - for some reason it just doesn't like the text to be bold.
Tags for this Thread