Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RTF S.O.S.
Message
 
À
22/12/1998 21:50:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00169892
Message ID:
00169928
Vues:
28
>Q1: How can I change the background color of a selected piece of text in the Rich Text control. The online documentation says that the "\cb" RTF code should do the trick but I had no luck (although its partner "\cf" DOES work for changing the forecolor) I looked at the RTF codes generate by Word when saving a document as RTF. It used the "\highlight" code but the RTF control seems to ignore this RTF code.

Through automation with word, you can select a block of text. This in turn creates a Selection object - which is a member of the Word Application Object.
Something like

With oWord.Selection.Font
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColorIndex = wdAuto
.BackgroundPatternColorIndex = wdRed
End With
End With


wdRed = 6
wdAuto = 0
>
>Q2: Where can I get a list of RTF codes and examples of how to use them? (The list given with the Rich Text Control, version 6 isn't very helpful.

Check out the following link: http://premium.microsoft.com/msdn/library/specs/f15/d11/s6cd3.htm


FWIW, I would suggest using HTML over RTF....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform