StyledText.Text

From Xojo Documentation

Method

StyledText.Text() As String

Supported for all project types and targets.

The text whose style attributes are managed via the instance of this class.

Notes

The Start and Index parameters of the methods of this class are zero-based and referenced from the start of Text. Set the value of Text using the assignment operator.

Setting the Text property clears any previously set style information. If you want to modify text inline without changing the style you will need to use the StyleRuns, adding and removing them as necessary.

Example

Add some styled text to a TextArea:

TextArea1.StyledText.Value = "Hello, World!"
TextArea1.StyledText.Bold(7, 5) = True // "World" is now bold