In System.Windows.Forms.RichTextBox, how to convert from LineNumber to character position?
-
07-07-2019 - |
Question
I would like the converse of RichTextBox.GetLineFromCharIndex()
I have a line number and I want to retrieve the char index for that line.
The method might be called RichTextBox.GetCharIndexFromLine()
.
Is it possible, simply?
Solution
richTextBox1.GetFirstCharIndexFromLine(int lineNumber)
OTHER TIPS
Yes, the method is RichTextBox.GetFirstCharIndexFromLine(LineNumber)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow