Consider the following situation: You want to display three blocks of text in one line:

Text alignment

Text can be positioned in many different ways. You can use use spaces between the blocks which is a very unclean way of positioning text. You can use a table to arrange the text which was a very popular way of designing HTML pages in the pre-CSS era.

In this particular case, the cleanest way of positioning text is the usage of tab stops. A tab stop is a horizontal position where the text is aligned to. In TX Text Control, 5 different tab types can be chosen from:

  • Left tabLeftTab
  • Right tabRightTab
  • Left tabCenterTab
  • Left tabDecimalTab
  • Left tabRightBorderTab

Back to our sample. In order to align the first block of text, we don't need a tab position. The text is automatically left aligned based on the paragraph settings. To add the centered text in the middle, we will use a CenterTab. And for the right aligned block of text, a right border tab is used:

Tab positions

Relevant links to the documentation:

ParagraphFormat.TabTypes property

ParagraphFormat.TabPositions property