Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RichText box - adding RTF codes directly
Message
From
14/08/1997 14:30:17
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brazil
 
 
To
12/08/1997 01:24:37
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00044147
Message ID:
00044705
Views:
32
>I'm trying to add a line to a RichText box using the .SelRTF property. I've gotton foreground color (\cf#) to work, but I can't seem to make background color (\cb#) to work at all. No matter what I try, the backgroud color of the text added just stays white. Here's the RTF string I'm adding:
>
> rtbDisplay.SelRTF = "{\rtf1\ansi" + ;
> "\deff0\deftab720" + ;
> "{\fonttbl{\f0\fmodern Fixedsys;}}" + ;
> "{\colortbl\red0\green0\blue255;\red0\green127\blue0;}" + ;
> "\cf0\cb1 This is a test\'0D\'0A" + ;
> "}"
>
>It seems to completely ignore the \cb1. And if I use rtbDisplay.SaveFile "c:\temp\temp.rtf", the \cb gets striped out completely. HELP!!! :)

Hi Lee,

Are you sure the RichText Active-X control supports setting different backcolors for different pieces of text? I didn't find any property for that, only the SelColor property... I suppose it only accepts a backcolor for the whole control, but I'm not sure...

Renato
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform