TX Text Control .NET Server

TabTypes 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 an array containing the tab types in a paragraph.

Syntax

public TabType[] TabTypes { get; set; }

Members

ValueDescription
LeftTabThe tab position is at the left side of the text.
RightTabThe tab position is at the right side of the text.
CenterTabThe text is centered to the tab position.
DecimalTabThe decimal sign is aligned at the tab position.
RightBorderTabThe tab is positioned right most and the text is diplayed at the left of this position. The tab position set with the TabPositions property is ignored. Only one tab of this kind is possible in a paragraph.

Examples

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

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

paragraphFormat.TabTypes = new TabType[] { TabType.LeftTab };
if (paragraphFormat.TabTypes != null)
{
    Console.WriteLine("Paragraph Format: Tab Types is available.");
}

textControl.Selection.ParagraphFormat = paragraphFormat;

Limitations

The maximum number of tabs in a parapgraph is 14.

Remarks

The default type is TabType.LeftTab.

The property returns an array with common values when the text selection contains multiple paragraphs with mixed types. The remaining not common values are set to zero. If all values are different, the Selection.IsCommonValueSelected method returns false.

Further Reading

  • Creating New Styles with TX Text Control .NET for Windows Forms –