BackColorBkgproperty
Returns or sets the background color of various elements of the MSHFlexGrid.
Syntax
PROPERTY BackColorBkg () AS OLE_COLOR
PROPERTY BackColorBkg (BYVAL clr AS OLE_COLOR)
Parameters
| Name | Description | |
|---|---|---|
clr | An OLE_COLOR value, such as a Visual Basic constant (e.g. vbDarkGray), a hex code, or an RGB value. |
Description
Returns or sets the background color of the grid. This property affects the overall appearance of the grid, especially when the control is larger than the total number of rows and columns displayed.
Remarks
While BackColor sets the background for individual non-fixed data cells, BackColorBkg fills the "unused" space at the bottom and right of the grid. By default, this is often set to a dark gray color.
In hierarchical views, BackColorUnpopulated specifically targets the space within bands that does not contain data, whereas BackColorBkg is for the global control background.
A common practice is to set BackColorBkg to match the background color of the parent form to create a "borderless" or seamless appearance.
Example
' Sets the unused area background to white grid.BackColorBkg = vbWhite
' To make it seamless with the form background grid.BackColorBkg = this.BackColor
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid