syntax-highlighting

RichTextBox syntax highlighting in real time--Disabling the repaint

你。 提交于 2019-11-26 01:54:37
问题 I\'m creating a function that takes a RichTextBox and has access to a list of keywords & \'badwords\'. I need to highlight any keywords & badwords I find in the RichTextBox while the user is typing , which means the function is called every time an editing key is released. I\'ve written this function, but the words and cursor in the box flicker too much for comfort. I\'ve discovered a solution--to disable the RichTextBox\'s ability to repaint itself while I\'m editing and formatting its text.