richtext control paragraphs

  • Thread starter Thread starter Pete Griffint
  • Start date Start date
P

Pete Griffint

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!
 
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.
 
Back
Top