I recently started to experiment a bit with colors in the text in a TRichEditBox.
I first add the text, and then I need to do some colors.
My method for doing this is : rmSource.SetRangeColor(wPos, wLen,clGreen)
where "rmSource" is the name of my RichEditBox.
At first glance, this works flawlessly, but even on a short text (like the top two lines here) where I want to do some 20-30 different colorings, this begins to take a noticeable amount of time. Sometimes in my RichEditBox, there will be up to 1000 words, and to do the coloring I want, it takes about 5 seconds.
Anybody aware of a method to increase the speed? or another EditBox which is a lot quicker and gives the ability to change font style and color quickly?
As a bottom line. My wPos and wLen -variables are straight out of an Index, so this is as fast as it can be.
On a text with 1000 words, I do approx 100 000 calculations and comparisons in less than a second. I find it so strange that it takes 5 seconds just to add a little bit of color