TX Text Control .NET Server

Selection Property

Property|Introduced in 12.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets or sets the current selection in a text frame. The property value is an object of the type Selection. For more information see the description of the Selection class.

Syntax

public Selection Selection { get; set; }

Examples

The following example uses a text frame's selection to insert and emphasize callout text.

TextFrame textFrame = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout", ID = 10 };
textControl.TextFrames.Add(textFrame, TextFrameInsertionMode.DisplaceText);
textFrame.Selection.Text = "Important: submit by Friday.";
textFrame.Selection.Bold = true;