FormatString Property

Assigns column widths, alignments, and fixed row and column text.

Syntax

[form!]VSFlexGrid.FormatString[ = value As String ]

Remarks

Use FormatString at design time to define the following elements of the control: number of rows and columns, text for row and column headings, column width, and column alignment.

The FormatString is made up of segments separated by pipe characters ("|"). The text between pipes defines a column, and it may contain the special alignment characters "<", "^", or ">", to align the entire column to the left, center, or right. The text is assigned to row zero, and its width defines the width of each column. The FormatString may also contain a semi-colon (";"), which causes the remaining of the string to be interpreted as row heading and width information. The text is assigned to column zero, and the longest string defines the width of column zero. If the first character in the FormatString is an equals sign ("="), then all non-fixed rows will have the same width.

The control will create additional rows and columns to accommodate all fields defined by the FormatString, but it will not delete rows or columns if a few fields are specified.

The FormatString property is obsolete. Use the Columns property page to set up your columns instead.

Data Type

String

See Also

VSFlexGrid Control