Hi,
I have created a highlight procedure in my text editor, to be used in a 'Find' method. So, I need to highlight every ocurrence of the found words. I defined that the found word would have its background as clLime. This code is done like this:
for every found word...
Code
oWPRichText.Finder.SelectText;
oWPRichText.CurrAttr.BKColor := oWPRichText.CurrAttr.ColorToNr(clLime, false);
But I also have defined that ProtectedTexts would have a defined color to its background (ProtectedTextAttr.UseBackgroundColor is TRUE and ProtectedTextAttr.BackgroundColor is $00D9FDFF).
The problem is simple. The color defined in BKColor never appears, if the found word is inside a protected area.
I tried to find a way to define 'which color is the boss', but with no success.
Does anyone has an idea?
Thanks for your help