Help Center

FixedColsproperty

Returns or sets the total number of fixed columns within an MSHFlexGrid.

Windowspropertydoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

PROPERTY FixedCols () AS LONG
PROPERTY FixedCols (BYVAL nCols AS LONG)

Parameters

NameDescription
nColsSpecifies the total number of fixed columns. The value must be at least 1 less than the total number of columns (Cols**), or a runtime error will occur.

Description

Returns or sets the total number of fixed columns in the grid. This property specifies how many columns are "frozen" as headers that do not move when the user scrolls through the data.

Remarks

Fixed columns and rows are constant when you scroll other columns or rows in the MSHFlexGrid. You can specify zero or multiple fixed columns rows. In addition, you can select the colors, font, gridline, and text style of the fixed columns and rows.

If the SelectionMode property is a numerical value, when you select a fixed column at run time, all cells within that column are selected.

If the AllowUserResizing property is a numerical value, you can resize the fixed rows or fixed columns at run time.

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

Example

' Always set total Cols before FixedCols grid.Cols = 5 grid.FixedCols = 1

' Populate the fixed column with a label grid.TextMatrix(0, 0) = "Record ID"

Reference