Some aspects of text styles lost during transition to RVF
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm
Some aspects of text styles lost during transition to RVF
I'm streaming out the contents of one TRichViewEdit into another one, and then saving the results as RTF. This seems to work OK, except for one problem: some aspects of some text styles disappear. For instance, I have some text styles that simply set a background colour for the text (light red, light grey, or light green). Those background colours never show up in the RTF document. Similarly, I have text styles which are superscript, underlined, italicised, and have a small font size: all of those properties show up except the font size change.
Can anyone suggest why some aspects of text styles would be lost during this transition? I'm not sure whether it's happening during the transition from one RVE to another through streaming RVF, or whether it's during the save operation to RTF. The second RVE control is created on the fly, offscreen, so I can't look at its contents.
All help appreciated,
Martin
Can anyone suggest why some aspects of text styles would be lost during this transition? I'm not sure whether it's happening during the transition from one RVE to another through streaming RVF, or whether it's during the save operation to RTF. The second RVE control is created on the fly, offscreen, so I can't look at its contents.
All help appreciated,
Martin
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm
No, the RVF output looks fine. There seems to be a problem saving the background colour in text styles to RTF. This is not limited to my application, because when I open the RVF file in the Action Test Demo, then save it out as RTF, the background colours are missing.
MyApp -> save to RTF: background colours missing
MyApp -> save to RVF, open in Action Test Demo: OK
Action Test Demo -> save to RTF: background colours missing
Could you try this for yourself? Create a couple of text styles with light red and light green background colours, then try saving to RTF.
Cheers,
Martin
MyApp -> save to RTF: background colours missing
MyApp -> save to RVF, open in Action Test Demo: OK
Action Test Demo -> save to RTF: background colours missing
Could you try this for yourself? Create a couple of text styles with light red and light green background colours, then try saving to RTF.
Cheers,
Martin
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm
My mistake! I was looking at the RTF file in WordPad! It looks as though WordPad doesn't support background colours in RTF. When I look at the file in a word-processor, the background colours show up.
Sorry about that -- I didn't think background colours were a particularly advanced feature!
Cheers,
Martin
Sorry about that -- I didn't think background colours were a particularly advanced feature!
Cheers,
Martin
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Wordpad does not understand text background, it understands text highlighting. Word understands the both of them. TRichView imports highlighting as text background, but saves only text background.
Highlighting is not a character attribute (unlike text size or color) but some special thing. And no more than 15 highlighting colors are possible in single document. Text background color does not have this limitation.
Highlighting is not a character attribute (unlike text size or color) but some special thing. And no more than 15 highlighting colors are possible in single document. Text background color does not have this limitation.