Label.Text Font Weight

What I’m trying to do: Hey all, just wondering if it’s possible to do something like this…

self.label.text = 'This is normal text, and ' + '<b>this is bold text</b>'

without using any outside librarys or messing with the native HTML and CSS. I am on the material design 3 theme.

Use a Rich Text component instead of a Label, and select the restricted HTML markup for it.

2 Likes

dang I wish I asked yesterday lol!!! Thank you so much @jshaffstall

For simple formatting like bold or italic, I like to use markup rather than html.

Here is a quick test done with an app that has InputBox as a dependency:

image

1 Like

Very nice @stefano.menci I’ll check this out as well. Thank you gents!