Lines in RichTextBox

Lines in RichTextBox

Post by Thomas Keh » Sat, 06 Dec 2003 23:20:19


I have a RichTextBox. I set the Property RightMargin of this Box to a value,
that i will not show the horizontal scrollbar. Now, the RichTextBox Wrap the
Lines automatically.
Now I would like to pick the lines out of the RichTextBox in such a way, as
they are indicated on the screen. That is, automatic line pagings because
of the right edge are to result in also individual lines. Can someone give
me a tip, how I can make that?


Lines in RichTextBox

Post by Fabrici » Sat, 06 Dec 2003 23:41:40

I'm not sure I quite understand your question, but
retrieving lines from the rtb control is easily done with
the "Lines" property. It returns all the lines (as shown
in the control) in a string array.

string[] myLines = richTextBox1.Lines;


this Box to a value,
RichTextBox Wrap the
in such a way, as
line pagings because
lines. Can someone give