StyledText.InsertStyleRun
From Xojo Documentation
This item was deprecated in version 2019r2. Please use StyledText.AddStyleRunAt as a replacement. |
Method
StyledText.InsertStyleRun(Run as StyleRun,Index as Integer)
Supported for all project types and targets.
Supported for all project types and targets.
Inserts the StyleRun passed at the insertion point designated by Index.
Notes
Index is zero-based. 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.AppendStyleRun(textarea1.Styledtext.StyleRun(1))
TextArea2.StyledText.InsertStyleRun(TextArea1.StyledText.Stylerun(0), 1)
TextArea2.StyledText.InsertStyleRun(TextArea1.StyledText.Stylerun(0), 1)