trichview.com

trichview.support




Switching TRVStyle between plain text and Rich Text


Return to index


Author

Message

Mark Loveless

Posted: 09/16/2002 22:40:44


I am porting a DOS legacy application that creates 3 reports to

Windows, and I am using TRichView viewed with TPrintPreview as my

report viewer.  Previously the application created a plain text

version for viewing and a printer version with imbedded PCL printer

control for printing.  Now the reports are to be displayed as a

WYSIWYG Print Preview.


Two of the reports are single font (Courier New 10), and so I am

creating them as plain text (with form feeds for page control) and

imposing the font with the TextStyles property of the TRVStyle

component - it looks and works just right.  The third report has two

fonts - Courier New 10 for the "header" and Courier New 7 for the

"detail" (the report was originally designed for a 132 character

mainframe printer).  I have encapsulated this third report in Rich

Text control info, and when viewed in Word or Wordpad fonts appear

correctly.  I changed the load to a LoadRTF for that version of the

report, and am calling Format, but the print preview still shows all

Courier New 10 font.  I assume this is because of the TextStyle with

the hard-coded font, but when I tried to set up a new style for the

Rich Text report I hit a snag - how to you tell TFontInfo to use the

font information in the Rich Text?   Leave the font size blank?  (I

haven't tried to see a blank is an allowable value - I suspect not -

that is my next experiment).


Anybody ran across this particular scenario before?


Many Thanks.


Mark Loveless





Powered by ABC Amber Outlook Express Converter