I have a RichTextBox that I want to reformat when the contents of the RichTextBox change. I have a TextChanged event handler.
Re-formatting (changing the colors of the selected areas) raises the TextChanged event. This results in an endless loop of the TextChange event, formatting, TextChange event, reformatting, etc.
How can I distinguish text changes from the application and text changes from the user?
I could check the length of the text, but not sure if this is completely correct.
Cheeso
source share