O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Tab Function

Class

Microsoft.VisualBasic.FileSystem

Syntax

Tab[(column)]
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

Description

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required