TabLeaders Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets an array containing the tab leaders in a paragraph. A tab leader defines how a tab gap is filled.
Syntax
public TabLeader[] TabLeaders { get; set; }Public Property TabLeaders As TabLeader()Members
| Value | Description |
|---|---|
| None | The tab gap is not filled. |
| Period | The tab gap is filled with periods. |
| Dot | The tab gap is filled with dots. |
| Dash | The tab gap is filled with dashes. |
| Underline | The tab gap is underlined. |
Examples
The following example applies paragraph layout to selected report text by using ParagraphFormat.TabLeaders.
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;
paragraphFormat.TabLeaders = new TabLeader[] { TabLeader.Period };
if (paragraphFormat.TabLeaders != null)
{
Console.WriteLine("Paragraph Format: Tab Leaders 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.TabLeaders = New TabLeader() { TabLeader.Period }
If paragraphFormat.TabLeaders IsNot Nothing Then
Console.WriteLine("Paragraph Format: Tab Leaders is available.")
End If
textControl.Selection.ParagraphFormat = paragraphFormatLimitations
The maximum number of tabs in a parapgraph is 14.
Remarks
The default type is TabLeader.None.
The property returns an array with common values when the text selection contains multiple paragraphs with mixed types. If the selection contains different tab leaders, the Selection.IsCommonValueSelected method returns false.