TX Text Control .NET for Windows Forms

DeactivateItem Method

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

Description

Deactivates the activated text frame and sets the input focus back to the text part that contains the text frame.

Syntax

public bool DeactivateItem();

Return Value

The return value is true, if a text frame has been deactivated. Otherwise it is false.

Examples

The following example works with text frames in the current document by using TextFrameCollection.DeactivateItem.

TextFrameCollection textFrameCollection = textControl.TextFrames;
textFrameCollection.Add(new TextFrame(new System.Drawing.Size(3000, 1200)) { Name = "Callout", ID = 100 }, TextFrameInsertionMode.DisplaceText);

if (textFrameCollection.DeactivateItem())
{
    Console.WriteLine("Deactivate Item completed successfully.");
}