Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / October 2005

Tip: Looking for answers? Try searching our database.

Background colors in RichTextBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
brian - 27 Oct 2005 04:49 GMT
Hi, I've been playing with RichTextBox and rtf format for a little while..
I've learned how to insert a color table in the head of my document and I've
learned the mark-up for coloring text...

So, let's say I have a header and color table like this:

{\colortbl;\red255\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
\red0\green255\blue0;}

And mark-up like this:

{\cf1\cb2 This is some colored text with a colored background}

Why does my richTextBox control correctly display the cf1 (color
foreground?) as red, but it seems to ignore the cb2 (color background?) which
I think I've set to blue?

Thanks,

Brian
"Jeffrey Tan[MSFT]" - 27 Oct 2005 08:32 GMT
Hi Brian,

Thanks for your post.

Can you provide a little sample project to demonstrate this problem? The 2
articles below showed how to highlight the background of RichTextBox:
"RichTextBox with background highlighting in VB.NET"
http://www.codeproject.com/vb/net/richtextboxhs.asp
"Background Highlighting with the RichTextBox the System way."
http://www.codeproject.com/vb/net/tarrorichtextbox.asp

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.