Lines in RichTextBox

T

Thomas Kehl

Hi!

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?

Thanks
Thomas
 
F

Fabricio

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.

Example:
string[] myLines = richTextBox1.Lines;

-Fabricio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top