Button | rendered as link | html tags

HI there,

i have a vaadin button, rendered as link:

    addStyleName(BaseTheme.BUTTON_LINK);
    addStyleName("mybuttoncaption");

The font color i changed already by a own style.

I want now, that some parts of the text of the button is rendered bold, like:
button.setValue(“this is the button text”);

Is there a way to do this?

Thanks a lot in adcance!
Uwe

Hi,

that’s easy, just call

button.setHtmlContentAllowed(true);

on your button, and you can use HTML tags in the button caption. Note that the default style for buttons already contains “font-weight: bold;”, so you have to remove that first to see any effect of .

Thanks a lot Roland, works well!