TX Text Control .NET Server

Activate Method

Method|Introduced in 16.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

Sets the input focus to the specified text part. If the activated text part is not in the visible part of the document, the document is scrolled.

Syntax

public bool Activate(object textPart);

Parameters

ParameterDescription
textPart

Specifies the object to activate. It must be an object of the type MainText, TextFrame or HeaderFooter.

Return Value

The return value is true, if the specified text part could be activated. Otherwise it is false.

Examples

The following example works with text parts in the current document by using TextPartCollection.Activate.

TextPartCollection textPartCollection = textControl.TextParts;

if (textPartCollection.Activate("Approved"))
{
    Console.WriteLine("Activate completed successfully.");
}