I know that parts of a label's text can have different colors. This is done via csbuilder.
But how can I change the color of a certain word, which beforehand is not known, but will be set later by the user?
The structure of a solution could be:
However, the question is: How can I realize ColorChange?
But how can I change the color of a certain word, which beforehand is not known, but will be set later by the user?
The structure of a solution could be:
B4X:
Dim text as String = "big problems need big solutions"
Dim word as String = "big" 'is set by user during runtime
Dim colored_text as CSBuilder = ColorChange(text, word, "red")
label.text = colored_text
However, the question is: How can I realize ColorChange?