Select RichTextBox line

T

tb

I need to select a particular line in a RichTextBox so I can perform
formatting operations on it. I have the line index, I just don't know how
to select it. Can anyone please help? Thanks.
 
G

Guest

You can set the ".SelectionStart" to the char index of the first char of the
line using GetFirstCharIndexFromLine(). You can then set .SelectionLength to
the length of the line.
 

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