Reputation: 91
I want to get a specific line from a text showed in a TextBox (could be RichTextBox as well, it doesn't really matter), but TextBox.Lines
Method recognize a new line only if there was an "Enter" inside the text.
My text is continuous, but the TextBox drops a line at a time runs out place on the same line. Is it possible to get a specific row from the text box by its length?
Upvotes: 2
Views: 89
Reputation: 3702
After wordwrap in a textbox, you can make use of this function:
textBox1.GetFirstCharIndexFromLine(line);
Upvotes: 3