Gets or sets the background color for selected text.


public Color TextBackColor { get; set; }
Public Property TextBackColor() As Color


The following example uses TextBackColor property to set the background color of the selected text "TX Text Control" as Yellow.

textControl1.Text = "TX Text Control";

TXTextControl.Selection mySel = new TXTextControl.Selection(3, 4);

mySel.Bold          = true;
mySel.Italic        = true;
mySel.TextBackColor = System.Drawing.Color.Yellow;

textControl1.Selection = mySel;
TextControl1.Text = "TX Text Control"

Dim mySel as TXTextControl.Selection = New TXTextControl.Selection(3, 4)

mySel.Bold          = True
mySel.Italic        = True
mySel.TextBackColor = System.Drawing.Color.Yellow

TextControl1.Selection = mySel


The property's default value is the system color for the window background.

The property returns its default value when the text selection contains multiple characters with mixed colors. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.