gregorianj
November 25th, 2002, 11:04 AM
I've created a Visual.net class called sqleditbox. It inherits from the richTextBox control. The goal is to highlight some syntaxis like comments and strings in the text. It works fine, I've just one problem. I've to use select to change the color of specific parts of the text. Evry time I'm recalculating the highlights, te control shows the process (of course very fast): it selects parts, and scrolls through the document. I've tried to prevent the control from repainting by overriding the onpaint proc, but it din't help. Finally I found a line in the help, which sais, that some controls (like TextBox) are redrawn by windows directly, and the paint event never raises. What can I do know. How to prevent a RichTextBox from repainting itself.