Help Center

BackColorBkgproperty

Returns or sets the background color of various elements of the 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 BackColorBkg () AS OLE_COLOR
PROPERTY BackColorBkg (BYVAL clr AS OLE_COLOR)

Parameters

NameDescription
clrAn 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