Hi,
I am programmatically selecting text and changing the fore colour. I believe this is done through the RadRichTextBox.ChangeTextForeColor() which changes the colours for all text that is selected.
So my process is:
1. Save existing selections
2. Add selections for the text I want to colour using Document.Selections.AddSelectionStart/End
3. Call ChangeTextForeColor(Colors.Red)
4. Revert previous selections
When I call this the first time it works correctly; however, I also want to revert the colours at specific point, and when I do this using ChangeTextForeColor(Colors.Black) I get an ArgumentOutOfRangeException on "startIndex cannot be larger than length of string"
Thanks
I am programmatically selecting text and changing the fore colour. I believe this is done through the RadRichTextBox.ChangeTextForeColor() which changes the colours for all text that is selected.
So my process is:
1. Save existing selections
2. Add selections for the text I want to colour using Document.Selections.AddSelectionStart/End
3. Call ChangeTextForeColor(Colors.Red)
4. Revert previous selections
When I call this the first time it works correctly; however, I also want to revert the colours at specific point, and when I do this using ChangeTextForeColor(Colors.Black) I get an ArgumentOutOfRangeException on "startIndex cannot be larger than length of string"
Thanks