Help Center

HighLightproperty

Determines whether selected cells appear highlighted within 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 Highlight () AS HighLightSettings
PROPERTY Highlight (BYVAL bHighlight AS HighLightSettings)

Parameters

NameDescription
bHighlightflexHighlightNever: There is no highlight on the selected cells.
flexHighlightAlways: The selected cells are always highlighted. (Default).
flexHighlightWithFocus: The highlight appears only when the control has focus.

Description

Determines whether selected cells appear highlighted within the MSHFlexGrid.

Remarks

This property controls the visibility of the highlight block (defined by BackColorSel and ForeColorSel).

When this property is set to zero and a range of cells is selected, there is no visual cue or emphasis indicating the selected cells.

Setting Highlight = flexHighlightAlways (1) is a common requirement for dashboard-style applications where the user needs to keep track of a selected record while typing data into a separate sidebar or detail view.

If a cell is merged, the built-in selection highlight may sometimes fail to appear correctly. In these specialized cases, developers often manually use CellBackColor as a fallback for custom highlighting.

While Highlight controls the broad selection colors, the FocusRect property manages the specific dotted or solid box around the single "anchor" cell within that selection.

Example

' Keep the blue selection bar visible at all times grid.Highlight = flexHighlightAlways

' Use with SelectionMode to highlight a whole record grid.SelectionMode = flexSelectionByRow

Reference