FixedAlignment Property

See Also5I18U9              ExampleFGN9G0>Low

Applies To

Grid2VGT0PT.

Description

Determines the alignment of data in the fixed cells of a column.  Not available at design time.

Usage

[form.]grid.FixedAlignment(column)[ = numericexpression ]

Setting

The FixedAlignment property settings are:

Setting         Description

 

0                  (Default) Left align.

1                  Right align.

2                  Center.

3                  Use the ColAlignment setting for the column specified by the column index.

 

Remarks

This property operates like the ColAlignmentV9JFN3 property except that it only affects the alignment of fixed cells.  This is useful when you want to align headings differently from the rest of the columns.

Data Type

IntegerDOKXHY (Enumerated)


See Also

Help:

ColAlignment PropertyV9JFN3

 

Programmer's Guide:

Chapter 3, "Creating and Using Controls"


FixedAlignment Example

The example creates a spreadsheet with centered column headings and row numbers.  To try this example, create a new project, add GRID.VBX using the Add File command on the File menu, and then draw a grid.  Press F5 to run the program.

Sub Form_Load ()

   Grid1.Cols = 5                  ' Set rows and columns.

   Grid1.Rows = 7

   Grid1.Row = 0

   Grid1.FixedAlignment(0) = 2     ' Set alignment of row numbers.

   For I = 1 To Grid1.Cols - 1     ' Set column letters & alignment.

      Grid1.FixedAlignment(I) = 2

      Grid1.Col = I

      Grid1.Text = Chr(64 + I)

   Next I

   Grid1.Col = 0

   For I = 1 To Grid1.Rows - 1     ' Set row numbers.

      Grid1.Row = I

      Grid1.Text = I

   Next I

End Sub