See Also Example
Applies To
Grid.
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 ColAlignment This is useful when you want to align headings differently from the rest of the columns.
Data Type
Integer (Enumerated)
Help:
ColAlignment Property
Programmer's Guide:
Chapter 3, "Creating and Using Controls"
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