Hello,
Is there a way to get all the text from a RichTextBox without having to select all the text first and then call GetSelectedText() on the document selection?
PS: Also, is it possible to get parts of text without having to select it first? For example, if I want to get the text on a line, i currently do this:
Is there a way to get all the text from a RichTextBox without having to select all the text first and then call GetSelectedText() on the document selection?
PS: Also, is it possible to get parts of text without having to select it first? For example, if I want to get the text on a line, i currently do this:
// Get line text range. startPosition.MoveToCurrentLineStart(); endPosition.MoveToCurrentLineEnd(); // Clear the previous selection. richFolderList.Document.Selection.Clear(); // Select line text. richFolderList.Document.Selection.AddSelectionStart(startPosition); richFolderList.Document.Selection.AddSelectionEnd(endPosition); var currentLine = richFolderList.Document.Selection.GetSelectedText();