Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this area used?
Message
From
12/08/1997 08:57:13
 
General information
Forum:
Visual C++
Category:
Other
Miscellaneous
Thread ID:
00044148
Message ID:
00044190
Views:
32
Well then, let me jump in with a question. It's more related to an ActiveX control that ships with VB than to VB itself...

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. Is there a way to set the background color of text being added through the normal properties/methods? For instance, I can use .SelColor to set foreground color... but there's no .SelBackColor. HELP!!! :)
-----
Lee Perkins
TigerBase Technologies

"Lee is one that would plug his brain into the internet, if he could, and STILL scream for more" - Very good friend of Lee's
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform