I have a RichTextBox with an OnChanged event. The OnChanged event should look at each line in the RichTextBox and if the line is of prime length colour it red, otherwise colour it black. How do I do this? I think it is possible to select from index a to index b and set selection colour, but I think this will lose my cursor position. How do I also preserve cursor position? Thanks for any suggestions.
Share
Sorry about the lack of comments! I imagine this will get massively inefficient when applied to a large .text property but this is not the intended use of the textbox.