TX Text Control .NET for Windows Forms

Remove Method

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

Description

Removes a text frame from a Text Control document.

Syntax

public bool Remove(TextFrame textFrame);

Parameters

ParameterDescription
textFrame

Specifies the text frame to remove.

Return Value

The return value is true, if the text frame could be removed. Otherwise, it is false.

Examples

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

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

if (textFrameCollection.Remove(new TextFrame(new System.Drawing.Size(600, 400))))
{
    Console.WriteLine("Remove completed successfully.");
}