TX Text Control .NET for Windows Forms

TextDistances Property

Property
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 distances, in twips, between the frame and the document's text. The property's value is an array of four variables specifying the distances in the following order: left, top, right and bottom. If a value is set to -1, it is not changed.

Syntax

public int[] TextDistances { get; set; }

Examples

The following example adds a callout frame and works with it through the common frame API by using FrameBase.TextDistances.

TextFrame callout = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout" };
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText);
FrameBase frameBase = callout;

frameBase.TextDistances = new int[] { 720 };
if (frameBase.TextDistances != null)
{
    Console.WriteLine("Frame Base: Text Distances is available.");
}