Cheeso
Cheeso

Reputation: 192457

In System.Windows.Forms.RichTextBox, how to convert from LineNumber to character position?

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?

Upvotes: 0

Views: 401

Answers (2)

Seth Moore
Seth Moore

Reputation: 3545

Yes, the method is RichTextBox.GetFirstCharIndexFromLine(LineNumber)

Upvotes: 3

manji
manji

Reputation: 47978

richTextBox1.GetFirstCharIndexFromLine(int lineNumber)

Upvotes: 3

Related Questions