FixedCols, FixedRows Properties

See Also2JYH96P              Example3ZA4UM>Low

Apply To

Grid2VGT0PT.

Description

Determine the total number of fixed columns or fixed rows for a grid.  By default, a grid has one fixed column and one fixed row.

Usage

[form.]grid.FixedCols[ = numericexpression ]

[form.]grid.FixedRows[ = numericexpression ]

Remarks

A fixed column is a stationary column on the left side of the grid. A fixed row is a stationary row along the top of the grid. You can have zero or more fixed columns and zero or more fixed rows.  Fixed columns and rows are displayed in gray and do not move when the other columns or rows in the grid are scrolled. You cannot change the color of a fixed column or row.

Fixed columns and rows are typically used in spreadsheet applications to display row numbers and column names or letters.

A grid must have at least one non-fixed column and one non-fixed row.  The maximum number of fixed columns or rows allowed in a grid is one less than the total number of columns or rows.

Data Type

IntegerDOKXHY


See Also

Help:

Cols, Rows Properties1WFQF0

FixedAlignment Property1NM2GHO

 

Programmer's Guide:

Chapter 3, "Creating and Using Controls"


FixedCols, FixedRows Properties Example

The example illustrates a grid with two fixed rows and two fixed columns.  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.  To run the program, press F5.

Sub Form_Load ()

   Grid1.Rows = 8       ' Set columns and rows.

   Grid1.Cols = 6

   Grid1.FixedRows = 2  ' Set fixed columns and rows.

   Grid1.FixedCols = 2

End Sub