TabPositions 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 an array containing the absolute tab stop positions, in twips, in a paragraph.
Syntax
public int[] TabPositions { get; set; }Public Property TabPositions As Integer()Examples
The following example applies paragraph layout to selected report text by using ParagraphFormat.TabPositions.
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;
paragraphFormat.TabPositions = new int[] { 1 };
if (paragraphFormat.TabPositions != null)
{
Console.WriteLine("Paragraph Format: Tab Positions is available.");
}
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.TabPositions = New Integer() { 1 }
If paragraphFormat.TabPositions IsNot Nothing Then
Console.WriteLine("Paragraph Format: Tab Positions is available.")
End If
textControl.Selection.ParagraphFormat = paragraphFormatLimitations
The maximum number of tabs in a line is 14.
Remarks
The default positions are multiple of 1134 twips (2 cm).
The property returns an array with common values when the text selection contains multiple paragraphs with mixed positions. The remaining not common values are set to zero. If all values are different, the Selection.IsCommonValueSelected method returns false.