Gets or sets underlining styles for the selected text.

Syntax

public FontUnderlineStyle Underline { get; set; }
Public Property Underline() As FontUnderlineStyle

Members

Member Description
None Text is not underlined.
Single Text is underlined with a single line.
Doubled Text is underlined with a doubled line.
SingleWordsOnly Only the words of the text are underlined with a single line.
DoubledWordsOnly Only the words of the text are underlined with a doubled line.

Examples

The following example uses Underline property to set the underlining style of the selected text i.e. "TX Text Control". The text will be underlined with a double line as the value given to property Underline is Doubled.

textControl1.Text = "TX Text Control";

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

mySel.Bold       = true;
mySel.Italic     = true;
mySel.Underline  = Underline.Doubled;

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.Underline  = Underline.Doubled

TextControl1.Selection = mySel

Limitations

Runtime only.

Remarks

The property's default value is FontUnderlineStyle.None.

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