473,388 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

What is end-of-line character(s) in a RichTextBox.Text string?

In a RichTextBox I'm displaying RichText .
Sometimes I search the Text property string
and sometime the RtfText string.

I need to know what is used for end-of-line in
both the RtfText and Text property strings.

I believe end-of paragraph is cr-lf
is that right?

Would the answers be different if I was displaying plain text?

Thanks in advance for any help
Nov 16 '05 #1
4 2815
Have you looked at Environment.NewLine

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Just Me wrote:
In a RichTextBox I'm displaying RichText .
Sometimes I search the Text property string
and sometime the RtfText string.

I need to know what is used for end-of-line in
both the RtfText and Text property strings.

I believe end-of paragraph is cr-lf
is that right?

Would the answers be different if I was displaying plain text?

Thanks in advance for any help

Nov 16 '05 #2
Just did.

But the RichEdit dll was probably created independently of .NET and I wonder
what they used.
Thanks

"Sijin Joseph" <si***************@hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP09.phx.gbl...
Have you looked at Environment.NewLine

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Just Me wrote:
In a RichTextBox I'm displaying RichText .
Sometimes I search the Text property string
and sometime the RtfText string.

I need to know what is used for end-of-line in
both the RtfText and Text property strings.

I believe end-of paragraph is cr-lf
is that right?

Would the answers be different if I was displaying plain text?

Thanks in advance for any help

Nov 16 '05 #3
Reflector(http://www.aisto.com/roeder/dotnet/) shows that
Environment.Newline is "\r\n"

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
Just Me wrote:
Just did.

But the RichEdit dll was probably created independently of .NET and I wonder
what they used.
Thanks

"Sijin Joseph" <si***************@hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP09.phx.gbl...
Have you looked at Environment.NewLine

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Just Me wrote:
In a RichTextBox I'm displaying RichText .
Sometimes I search the Text property string
and sometime the RtfText string.

I need to know what is used for end-of-line in
both the RtfText and Text property strings.

I believe end-of paragraph is cr-lf
is that right?

Would the answers be different if I was displaying plain text?

Thanks in advance for any help


Nov 16 '05 #4
I know. What I'm wondering is does RichEdit use that or something else?
Maybe Lf only?

Thanks


"Sijin Joseph" <si***************@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP09.phx.gbl...
Reflector(http://www.aisto.com/roeder/dotnet/) shows that
Environment.Newline is "\r\n"

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
Just Me wrote:
Just did.

But the RichEdit dll was probably created independently of .NET and I wonder what they used.
Thanks

"Sijin Joseph" <si***************@hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP09.phx.gbl...
Have you looked at Environment.NewLine

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Just Me wrote:

In a RichTextBox I'm displaying RichText .
Sometimes I search the Text property string
and sometime the RtfText string.

I need to know what is used for end-of-line in
both the RtfText and Text property strings.

I believe end-of paragraph is cr-lf
is that right?

Would the answers be different if I was displaying plain text?

Thanks in advance for any help


Nov 16 '05 #5

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

Similar topics

0
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...
3
by: kangoo | last post by:
Hi, I'm trying to remove the last charater in a richTextBox. I though richTextBox.Text.Remove(richTextBox.Text.length-1, 1); would work, but it does nothing (eg richTextBox.Text += "some new...
1
by: James Dean | last post by:
Can you make vertical text in a richtextbox or is there any way around this like make the string vertical outside the textbox then try to paste it in that way into the textbox?.... *** Sent...
1
by: Arlyn_L | last post by:
Can someone please explain why I get a different result when using the GetLineFromCharIndex method on the last char in the Text property and the Lines.Length property? MainForm_gedcomTextBox is...
4
by: One Handed Man | last post by:
Ive been working on this since yesterday and its bugging me. Although the event is firing, The box does not scroll. Can anyone see what Im doing wrong. I suspect it is stupidly simple. TIA
12
by: M O J O | last post by:
Hi, If I inside a thread creates a RichTextBox and only use this inside the thread, will there be any thread problems? I need to convert between Text and RTF inside a thread. Thanks!! M...
5
by: Ludwig | last post by:
Goal: text that is pasted in a RichTextBox control has to be formatted (keywords should get another forecolor/style). My first attempt to format the text was the traditional approach of setting...
2
by: Mystique | last post by:
Hello Is there any way to format text with tags (something like html tags) in a RichTextBox? Something similar to this: string aStr; aStr = "<b>this is bold</bthis is normal"; ...
0
by: jason | last post by:
Hello - I have this simple code that highlights THE FIRST string found, but NOT ALL strings in the richtextbox. Can anybody suggest an easy way to hightlight all strings (caseless as well) in the...
0
by: dfirka | last post by:
Dear Everyone, Using a RichTextBox I need to replace text based on certain RTF codes found into the RTF string I look for certain embedded (hidden) information using: int i =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.