BackColorFixedproperty
Returns or sets the background color of various elements of the MSHFlexGrid.
Syntax
PROPERTY BackColorFixed () AS OLE_COLOR
PROPERTY BackColorFixed (BYVAL clr AS OLE_COLOR)
Parameters
| Name | Description | |
|---|---|---|
clr | An OLE_COLOR value. This can be a standard VB constant (e.g., vbGrayText), a hex color code, or an RGB value. |
Description
Returns or sets the background color of the fixed cells of the grid. Fixed cells are the non-scrolling rows and columns typically used for headers or labels
Remarks
Affects all cells in the rows defined by the FixedRows property and columns defined by the FixedCols property.
It is commonly used to differentiate header labels from the scrollable data area (controlled by the BackColor property).
While BackColorHeader(BandNumber) sets the color for headers of a specific hierarchical level, BackColorFixed is the general property for the grid's overall fixed boundaries.
Example
' Sets the background color of all fixed rows and columns to light gray grid.BackColorFixed = &HC0C0C0 ' vbSilver
' Alternatively, using a specific system color for theme consistency grid.BackColorFixed = vbButtonFace
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid