Highlighter RichTextBox control

L

Ludwig

Hi,

thanks to the insight that Kevin Spencer gave me concerning my regular
expressions question from a few days ago, I managed to create a first
version of my (free) Highlighter RichTextBox control. In short: it
highlights portions of text in specified (fore- and background)colors,
with a specified parser.

I found a number of controls on the net, but all of them had some
problems: mostly performance issues with larger texts and flickering
problems.

Besides the fact that I needed to learn how regular expressions work,
I also needed to find a solution for the performance and flickering
issues.

The performance issues have been solved by only updating the part of
the text that needs to be updated; instead of the whole text. The
flickering issue has been solved by eating paint messages when it is
not needed to repaint the control.

A first version of the control can be downloaded at
http://www.coders-lab.be/mysoftware.html, if someone is intrested.

Always intrested in feedback on how to improve it.

Kind regards,
Ludwig
 
K

Kevin Spencer

Good work, Ludwig! Wish I had the time to try it out, but I'm swamped at the
moment. It sounds like you've got a solid Control there, though.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
 
L

Ludwig

Hi,

thanks to the insight that Kevin Spencer gave me concerning my regular
expressions question from a few days ago, I managed to create a first
version of my (free) Highlighter RichTextBox control. In short: it
highlights portions of text in specified (fore- and background)colors,
with a specified parser.

I found a number of controls on the net, but all of them had some
problems: mostly performance issues with larger texts and flickering
problems.

Besides the fact that I needed to learn how regular expressions work,
I also needed to find a solution for the performance and flickering
issues.

The performance issues have been solved by only updating the part of
the text that needs to be updated; instead of the whole text. The
flickering issue has been solved by eating paint messages when it is
not needed to repaint the control.

A first version of the control can be downloaded at
http://www.coders-lab.be/mysoftware.html, if someone is intrested.

Always intrested in feedback on how to improve it.

Kind regards,
Ludwig

I forgot to ask my question :)

if a huge file is loaded (or pasted), it is parsed completely; but
this takes a very long time, especially the updating of the text in de
richtextbox takes forever for large amounts of texts.

Any suggestions on how to solve this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top