TX Text Control .NET Server

LeftIndent Property

Property
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 distance, in twips, between the left edge of the Text Control and the left edge of the text.

Syntax

public int LeftIndent { get; set; }

Examples

The following example applies paragraph layout to selected report text by using ParagraphFormat.LeftIndent.

textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;

paragraphFormat.LeftIndent = 720;
Console.WriteLine($"Left Indent used by Paragraph Format: {paragraphFormat.LeftIndent}");

textControl.Selection.ParagraphFormat = paragraphFormat;

Remarks

The property's default value is zero.

The property returns its default value when the text selection contains multiple paragraphs with mixed left indents. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.