How do I get the current line and column numbers in a RichTextBox in a Winforms application?
NOTE
Folks, I just want a simple solution, if it’s available by someone and he’s willing to share it with us, and not links to do research! Just give me some code please! Otherwise, I’ll have to buy a control…
For row and column, check out the Richer RichTextBox project. It is an extended version of the RichTextBox which supports the row and column numbers. The code from the article:
To achieve such behavior, we need to extend the RichTextBox class in the following manner:
Displaying line number in RichTextBox for the line number portion.