Answer the question
In order to leave comments, you need to log in
How to get row and column number in richtextbox?
How to get row and column number in richtextbox?
int i = richTextBox1.SelectionStart;
int line = richTextBox1.GetLineFromCharIndex(i);
label1.Text = line.ToString();
int fc = richTextBox1.GetFirstCharIndexFromLine(line);
int column = i - fc;
label2.Text = column.ToString();
it's not right here
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question