StyledText.TextColor

From Xojo Documentation

Method

StyledText.TextColor(Start as Integer, Length as Integer) As Color

Supported for all project types and targets.

Gets or sets the text color for the selected text in Text.

Notes

Start is the starting position in Text. The default value for Length is 1. Returns a Color. Use assignment syntax to set the value.

Example

Bold some text in a TextArea:

TextArea1.StyledText.Value = "Hello, World!"
TextArea1.StyledText.TextColor(7, 5) = &cff0000 // "World" is now red