Gets or sets the current selection in the main text of the document. The property value is an object of the type Selection. A selection can be used to assign character and paragraph formatting attributes to a piece of text.

Syntax

public Selection Selection { get; set; }
Public Property Selection() As Selection

Examples

The following examples describes how to use the 'TXTextControl.MainText.Selection' property by storing it in a variable of the type 'TXTextControl.Selection'.

TXTextControl.MainText mainText = textControl1.TextParts.GetMainText();
//...
TXTextControl.Selection myMainTextSelection = mainText.Selection;
//...
Dim mainText As TXTextControl.MainText = TextControl1.TextParts.GetMainText()
'...
Dim myMainTextSelection As TXTextControl.Selection = mainText.Selection
'...