Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print rich text from a Text Box
Message
 
To
12/10/1998 14:02:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00145964
Message ID:
00146002
Views:
26
>Hi,
>
>Does any body knows how to send the rich text formatted text to printer. (Note: RichText is saved in a memo field.) and we are using RichText active X components to show fonts, Size and Colors on the form but when you we print it through the report writer or directly to the printer it Prints Codes and Special Characters.
>
>Help......
>
>
>Thanks
>
>Abdul H. Bokhari,
>
>CanaSoft / CronoMagic Inc.

are you printing the stored field or are you converting it back to char format?

from help:
You can set the ControlSource of a RichText control directly to a character field, but not a memo field. Instead, create a form property to mediate between the RichText control and the memo field.

To store RTF text in a memo field

1	Set the ControlSource property of the RichText control to the form property.

THISFORM.oleRTF.ControlSource = THISFORM.cText

2	Store the memo field contents to the form property.

THISFORM.cText = rtf.source

3	Before moving the record pointer, store the TextRTF property of the RichText control to the memo field.

REPLACE rtf.Source WITH THISFORM.oleRTF.TextRTF

The text stored in the memo file is standard RTF format, for example:

{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;\red255\green0\blue0;} \deflang1033\pard\qc\plain\f3\fs32\i The RichTextBox Control \par \pard\plain\f3\fs20 
Previous
Reply
Map
View

Click here to load this message in the networking platform