When I select text by mouse in richTextBox and change its font this line works correctly:
Font NewFont = new Font(toolStripComboBox1.SelectedItem.ToString(), GetCurrentDocument.SelectionFont.Size, GetCurrentDocument.SelectionFont.Style);
But when selecting text by ctrl+a
then edit it, I get an error that object reference not set to an instance of an object. How to get the text I selected by ctrl+a
?