473,763 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RichTextBox problem - lost background

Hi,

thanks Noah for your advice.

I wrote following to read a rich text file into a RichTextBox control:

this.m_textBox. LoadFile(openFi leDialog1.FileN ame,
RichTextBoxStre amType.RichText );

I created a RTF file in Word, and gave the background yellow. But when open
the file
in the RichTextBox control the background becomes white instead of yellow.

Can anyone tell me what is the problem? Many thanks
Yuelin
Nov 15 '05 #1
1 2008
Glad it was of help. Simply put, the RichTextBox control doesn't support
that formatting element. It is unfortunate...

-Noah Coad
Microsoft MVP & MCP [.NET/C#]
"Yuelin" <li***@lineone. net> wrote in message
news:uA******** *****@tk2msftng p13.phx.gbl...
Hi,

thanks Noah for your advice.

I wrote following to read a rich text file into a RichTextBox control:

this.m_textBox. LoadFile(openFi leDialog1.FileN ame,
RichTextBoxStre amType.RichText );

I created a RTF file in Word, and gave the background yellow. But when open the file
in the RichTextBox control the background becomes white instead of yellow.

Can anyone tell me what is the problem? Many thanks
Yuelin

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2013
by: Dean | last post by:
Printing content of RichTextBox (as described here (in C#) http://support.microsoft.com/default.aspx?scid=kb;en-us;812425) results in white background of the text printed. Is there any way of sending the content of rich text box to printe and specifying different background color? Any suggestion is more than appreciated! Thanx All!
1
6551
by: Yuelin | last post by:
Hi there How can I read a RTF file into a RichTextBox control without the original format being lost? And how can I save the text entered in a RichTextBox into a RTF file without the original format being lost? It seems I can't use System.IO.StreamReader. Is there any thing I can use to do this? Many thanks
0
1540
by: Leitgeb | last post by:
RichText has 2 properties for setting text color and text. RichTextBox.SelectionColor = Color.Black ; RichTextBox.SelectionText = "Hello World" ; How do I set yello color background for "Hello" ? How to add a smiley image(smile.gif) before hello world string in RichTextBox? Not able to figure out the magic rtf string for the same.
2
4975
by: Leon Friesema | last post by:
Hiyall! I have a RichTextBox inside a UserControl which should be able to indent a block off text (or UnIndent for that matter) like the SourceEditor of VS2003 or WinWord does. All controls on the form (except for the RichTextBox) have TabStop=False and I have a KeyDown event handler which calls the IndentSelection function. No problem with the indenting (I've watched when stepping through the code) except.. The e.Handled does not seem...
7
2059
by: Richard | last post by:
When you give focus to a RichTextBox, then it goes to the textCursor, but i don't want to give the richtextbox focus, cause there is being written a lot in it, and I have to do something else at the same time, then if I don't give it focus, and I add some text to it, then it don't automaticly scrolls down to the textcursor, is there a way to make the RichTextBox scroll down to the textcursor, without giving it focus?? Richard
4
996
by: Supra | last post by:
>:o wooooooooow!..........i did this!!!!!!!!!!!!!!!! 8-) i got richtextbox working that will work with both background and forecolour to enable work with irc chat similar to mirc , pirch etc, with no third party. =-O regards ;-)
3
7186
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to just add plain (e.g.. rtf.Text += "new stuff..."; ) but some text, when added, I want to be in a different color or font size. Find() will not work because the text will vary. I have delimiters on it so I could recognize it with a regular ...
2
1017
by: Luke | last post by:
I want 3 lines of green bars in richtextbox to be displayed every other 3 lines which can be toggled on and off. (3 lines of white background, 3 lines of green background, 3 lines of white background, ... and so on) This would make the content in my richtextbox easier to read. Please give me any suggestions to accomplish this.
2
2589
by: drfreaky | last post by:
Hello, I want to use a richtextbox for logging status messages. I have three kind of message types and want to use different formatting for them. My problem is, I change the color, add the text and the added text is shown in another color. I scroll to the end and want to add the next status line using appendtext. But now the previous line lost its formatting...... I want to keep the formatting… Do you have a solution? BTW I am using...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.