Hi,
i want to implement an option similar to line numbers
option in c# editor. how can i display line numbers on
left side in text box.how can i know the present cursor
location with respect to control.
You can using this:
string fullText=textBox1.Text;
int linesInFullText=wholeText.Split('\n').Length;
string textToCursor=wholeText.Substring(0, textBox1.SelectionStart);
int currentLineNumber=(textToCursor.Split('\n').Length-1);
But i can not invent any good presentation of line numbers other
than e.g. ListBox on the left side of TextBox.
Regards
Marcin