-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Hey Bobtedbob,
There is no way to set different style within 1 label.
There are 3 solutions what you can do.
As Darksu already mentioned, you can use a hlayout
where you put children
attribute for the children and so dynamicly construct different labels with there styles.
Use ckeditor in stead of label. ckeditor is a textbox who supports html(and create html output when you type). The problem here is it's not a label.
Use htmlNativeComponent.
This is possible when your text in controller or viewmodel is already html with the colors.
Example use :
Hlayout parent; // this must be wired in controller or use @selectorParam in viewmodel
HtmlNativeComponent n = new HtmlNativeComponent("html", myString, "");
parent.getChildren().clear();
parent.appendChild(n);
Greetz chill.
2 | No.2 Revision |
Hey Bobtedbob,
There is no way to set different style within 1 label.
There are 3 solutions what you can do.
As Darksu already mentioned, you can use a hlayout
where you put children
attribute for the children and so dynamicly construct different labels with there styles.
Use ckeditor in stead of label. ckeditor is a textbox who supports html(and create html output when you type). The problem here is it's not a label.
Use htmlNativeComponent.
This is possible when your text in controller or viewmodel is already html style with the colors.
Example use :
Hlayout parent; // this must be wired in controller or use @selectorParam in viewmodel
HtmlNativeComponent n = new HtmlNativeComponent("html", myString, "");
parent.getChildren().clear();
parent.appendChild(n);
Greetz chill.