Tab Function




column (optional; Short)

A column number to which the insertion point will move before displaying or printing the next expression

Return Value

A TabInfo structure


Moves the text-insertion point to a given column or to the start of the next print zone

Rules at a Glance

  • If the column argument is omitted, the text-insertion point will be moved to the beginning of the next print zone.

  • The value of column determines the behavior of the insertion point:

Value of column

Position of insertion point

Current column > column

Moves one line down to the column column.

column > Output Width

Uses the formula column Mod width. If the result is less than the current insertion point, the insertion point will move down one line; otherwise, the insertion point will remain on the same line.

< 1

Column 1

  • The left hand column is always 1.

  • When expressions are output to files using the Print or PrintLine statement, the width of the output is determined by the Width statement.

  • When output surface is divided into columns, the width of each column is the average width of all characters in the current point size of the current font. This means that the number of columns for tabulation purposes does not necessarily relate to the number of characters that can be printed across the width of the output surface.

Programming Tips and Gotchas

The Tab function without a column argument is useful when outputting data to a file ...

Get VB.NET Language in a Nutshell, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.