Share via


BackColor, BackColorBkg, BackColorFixed, BackColorSel Properties (ModHFGrid)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns or sets the background color of various elements of the ModHFGrid.

Syntax

object.BackColor [=color]
object.BackColorBkg [=color]
object.BackColorFixed [=color]
object.BackColorSel [=color]

Syntax for the BackColor, BackColorBkg, BackColorFixed, and BackColorSel properties has these parts:

Part Description
object An object expression that evaluates to the ModHFGrid Control object.
color A numeric expression that specifies the color.

Remarks

BackColor affects the color of all non-fixed cells. To set the background color of individual cells, use the CellBackColor property.

Example

The following example uses the BackColorBkg, BackColorFixed, and BackColorSel properties in the ModHFGrid. It resets the colors of the control's background, selected background, and fixed-cell background randomly twice each second for the ModHFGrid. To use this example, paste the code into the Declarations section of a form with a Timer control and a ModHFGrid with the names Timer1 and ModHFGrid1 respectively, and then load the form.

Private Sub Form_Load ()
   Timer1.Interval =500
End Sub

Private Sub Timer1_Timer ()
   ModHFGrid1.BackColorBkg =QBColor(Rnd * 15)
   ModHFGrid1.BackColorFixed =QBColor(Rnd * 10)
   ModHFGrid1.BackColorSel =QBColor(Rnd * 10)
End Sub

See Also

CellBackColor, CellForeColor Properties (ModHFGrid) | ModHFGrid Control