HangingIndent Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets or sets the distance, in twips, for the hanging indent. A negative value indicates an additional indent of the paragraph's first line.
Syntax
public int HangingIndent { get; set; }Public Property HangingIndent As IntegerExamples
The following example applies paragraph layout to selected report text by using ParagraphFormat.HangingIndent.
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;
paragraphFormat.HangingIndent = 720;
Console.WriteLine($"Hanging Indent used by Paragraph Format: {paragraphFormat.HangingIndent}");
textControl.Selection.ParagraphFormat = paragraphFormat;textControl.Text = "First item" & vbCrLf & "Second item" & vbCrLf & "Third item"
textControl.Select(0, textControl.Text.Length)
Dim paragraphFormat As ParagraphFormat = textControl.Selection.ParagraphFormat
paragraphFormat.HangingIndent = 720
Console.WriteLine($"Hanging Indent used by Paragraph Format: {paragraphFormat.HangingIndent}")
textControl.Selection.ParagraphFormat = paragraphFormatRemarks
The property's default value is 0.
The property returns its default value when the text selection contains multiple paragraphs with mixed hanging indents. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.