Page 1 of 1

White font on red background

Posted: Tue Feb 01, 2011 11:10 pm
by RonCdeWeijze
When I open a second RichViewEdit control which is visible like the first one is, still on screen, then the text turns white on a red background. I would like that not to happen but stay black on white. Is there a way to suppress that? Thanks for your help!

Posted: Wed Feb 02, 2011 10:21 am
by Sergey Tkachenko
This text is displayed using properties of RVStyle.TextStyles.InvalidItem.
It happens because text in this document has invalid StyleNo (too large index in the collection RVStyle.TextStyles, greater than RVStyle.TextStyles.Count-1).

If you have two different editors linked to the same RVStyle, the most probably, one of editors cleared styles (for example, when loading a document), and style indices in the second editor become invalid.
Use one RVStyle for one TRichViewEdit to avoid this problem.

Posted: Wed Feb 02, 2011 11:44 pm
by RonCdeWeijze
You were right about the second RVStyle. Many thanks.