System.Windows.Forms.RichTextBox.SelectionColor Property

Gets or sets the text color of the current text selection or insertion point.


public System.Drawing.Color SelectionColor { set; get; }


Documentation for this section has not yet been entered.


If the current text selection has more than one color specified, this property returns Color.Empty. If no text is currently selected, the text color specified in this property is applied to the current insertion point and to all text that is typed into the control after the insertion point. The text color setting applies until the property is changed to a different color or until the insertion point is moved to a different section within the control.

If text is selected within the control, the selected text and any text entered after the text selection will have the value of this property applied to it. You can use this property to change the color of text in the System.Windows.Forms.RichTextBox.

To make text bold in the control, use the RichTextBox.SelectionFont property to assign a new font that has the bold font style specified.


Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0,