Style of Labels and radioButtons label

I made a simple application to try multiple microej widgets and their style using stylesheet.
When i try to add an editable style to my labels, it also applied to the labels of my radio buttons.
How can i make it so my style only apply to my labels and not to the labels of my radio buttons.
Thank you.

Hi @flardy,

Instead of applying a style to every Label you can apply styles on specific instances with custom classes you can create.

Using the API of addClassSelector API of StyleWidget [1], you can specify your custom class. Then using the addRule API of Stylesheet [2], you can apply a custom style to your label.

You can also look at the Demo widget [3] for a complete example that is using styled widgets.



Hello gaetan,
Thank you for your reply, this is exactly what i needed.
It works as intended now.