White font on red background

General TRichView support forum. Please post your questions here
Post Reply
RonCdeWeijze
Posts: 9
Joined: Fri Nov 20, 2009 3:06 pm

White font on red background

Post 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!
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
RonCdeWeijze
Posts: 9
Joined: Fri Nov 20, 2009 3:06 pm

Post by RonCdeWeijze »

You were right about the second RVStyle. Many thanks.
Post Reply