Say I clicked somewhere inside a RichTextBox control. How can I get the current line the caret is currently on?
Btw this is to retrieve the whole text string of that line.
Say I clicked somewhere inside a RichTextBox control. How can I get the current line the caret is currently on?
Btw this is to retrieve the whole text string of that line.
That's what RichTextBox.GetLineFromCharIndex() does. Pass the SelectionStart property value.