Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RTF input and printing
Message
De
23/07/1998 17:42:36
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00120747
Message ID:
00120760
Vues:
26
Hi Reg ---

>I have a huge need to be able to enter and print rtf-enhanced text. I have been able to add an rtf control to my form and bind it to the data, and it saves the rtf codes in the table along with the text that shows on the form, but there are two things I haven't been able to get it to do yet.
>
>1. accept formatting commands, e.g., use mouse to highlight a portion of text (this much works, of course) and then change its font characteristics. The documentation says right click gets a menu of all the verbs, but all I get there is the standard edit menu (cut, copy, paste, etc.)
>

Have you looked at the code behind the RichText example in the Solutions app that ships with VFP? There are a lot of write-only properties like SelFont,SelUnderlined that change the characteristics of the current selected text in the control. I didn't see a RightClick but I guess you could subclass the RichText control and put code into the RightClick method of the subclass.

>Bonus question: Is VFP 6.0 any better at this?

VFP6 has an _rtfcontrols classlib that sets up a standard toolbar-like container with Word-like font selection controls.

Sorry I can't help you on the printing end of it...but you may be better off calling Word in the long-haul.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform