A tab stop can be used to achieve several goals: creating a textual table, indenting a paragraph or adding space between two words. But there are more applications for special types of tabs. TX Text Control offers 5 different types:

  1. Left tab
  2. Right tab
  3. Centered tab
  4. Decimal tab
  5. Right tab at the right most position

The first three tab types are commonly known used. But the other two types are very interesting and can be used in a wide number of applications.

A decimal tab can be used to display decimals, such as currencies in an invoice or quotation.

For example: USD 2,000.00

In this case, the dot between the dollars and cents is positioned at the tab stop.

The right tab at the right most position is ideally suited to positioning a date in a letter at the upper right corner. The content will be automatically right aligned.

The different types can be selected by clicking on the tab type button at the left corner in the ruler bar. Additionally, a button in the button bar can be used, if a non-page oriented page view is used. In this case, the ruler bar does not contain this special button.

A paragraph can contain 14 tab stops. In the ActiveX version of TX Text Control, a tab stop can be inserted programmatically in this way:

TXTextControl1.TabCurrent = 1
TXTextControl1.TabType = 4
TXTextControl1.TabPos = 1440

This inserts a decimal tab 1 inch from the left page margin.

In TX Text Control .NET for Windows Forms, this tab will be inserted using the ParagraphFormat class.

Dim myTabTypes(13) As TXTextControl.TabType
myTabTypes = TextControl1.ParagraphFormat.TabTypes
myTabTypes(1) = TXTextControl.TabType.DecimalTab
TextControl1.ParagraphFormat.TabTypes = myTabTypes

The following code snippets shows you how to delete the default tabs.

TX Text Control ActiveX:

for n=14 to 1 step -1
    TXTextControl1.TabCurrent = n
    TXTextControl1.TabPos = 0
next n

TX Text Control .NET for Windows Forms:

TextControl1.ParagraphFormat.TabPositions = New Integer(13) {0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}