TX Text Control .NET for Windows Forms

Selection Property

Property|Introduced in 16.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the current selection in the text part. 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

Selection Selection { get; set; }

Examples

The following example updates the formatted text part's selection and applies it back to that text part.

Selection selection = iFormattedText.Selection;
selection.Bold = true;
iFormattedText.Selection = selection;