StyledText.AddStyleRunAt

From Xojo Documentation

Method

StyledText.AddStyleRunAt(Run as StyleRun,Index as Integer)

New in 2019r2

Supported for all project types and targets.

Adds the StyleRun passed at the insertion point designated by Index.

Notes

You can get the total number of StyleRuns in Text from the StyleRunCount method.

Example

This example appends a StyleRun into a TextArea and then inserts another one in an earlier position.

TextArea2.StyledText.AddStyleRunAt(textarea1.Styledtext.StyleRun(1))
TextArea2.StyledText.AddStyleRunAt(TextArea1.StyledText.Stylerun(0), 1)