Partager via


HighlightStyle Property

Specifies whether the selected row in a Grid remains highlighted when changing the focus to another control in the form. Read/write at design and run time.

HighlightStyle works with the HighlightForeColor and HighlightBackColor properties in determining whether the selected row is highlighted, and whether it remains highlighted when you press the TAB key to move around in the grid, or when you click outside the grid to move focus to another control.

Grid.HighlightStyle [ = nValue ]

Parameters

  • nValue
    Numerical data type. The following table describes the settings for nValue.

    nValue  

    0

    No color highlighting for grid row (Default)

    1

    Enable highlighting for current row.

    2

    Enable highlighting for current row and persist when grid is not the current active control.

Remarks

Applies To: Grid Control

If HighlightStyle contains a value greater than 0, the default color of HighlightBackColor appears as a 50% lighter gradient fill.

If HighlightStyle is set to a value of 2, only the highlight colors persist. Selected items display only when a grid has focus.

When the AllowCellSelection property is set to False (.F.), the current row is always highlighted when HighlightStyle is set to a value of 0.

If a column's Sparse property is set to False (.F.), the column will not be highlighted, when the grid's HighlightStyle property is set to 1 or 2.

See Also

Reference

HighlightForeColor Property
Highlight Property
HighlightBackColor Property
HighlightRow Property
AllowCellSelection Property

Other Resources

Properties (Visual FoxPro)