By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,238 Members | 1,804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,238 IT Pros & Developers. It's quick & easy.

richtext control paragraphs

P: n/a
Howdy!
I want to get the following in a Richtext control:

Paragraph 1....
Paragraph 2...
Obviously I want to do something like
rtb.SelectedText="Paragraph 1...";
rtb.SelectedText=<paragraph break>; (*)
rtb.<arrange indentation>;
rtb.SelectedText="Paragraph 2...";
but the trouble is the only way I can find to start a new paragraph is for
line (*) to be rtb.SelectedText="\n\n";
which rather defeats the object, as I don't want a blank line between the
paragraphs. How can I start a new paragraph, but only move the caret on to
the next line?

Thanks!
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It looks like tht Richtext control will treat all contiguous lines (no blank
lines in between) as a single paragraph, so...

I don't believe you can do this and still treat them as separate paragraphs.
You could use "\n", then indent, but if paragraph-level formatting is
applied, it will apply to both.
"Pete Griffint" <pe***********@hotmail.com> wrote in message
news:8a**************************@posting.google.c om...
Howdy!
I want to get the following in a Richtext control:

Paragraph 1....
Paragraph 2...
Obviously I want to do something like
rtb.SelectedText="Paragraph 1...";
rtb.SelectedText=<paragraph break>; (*)
rtb.<arrange indentation>;
rtb.SelectedText="Paragraph 2...";
but the trouble is the only way I can find to start a new paragraph is for
line (*) to be rtb.SelectedText="\n\n";
which rather defeats the object, as I don't want a blank line between the
paragraphs. How can I start a new paragraph, but only move the caret on to
the next line?

Thanks!

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.