[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.AlternateColor

Color used for the background in alternate rows in the grid.

Declaration

Source position: grids.pas line 1220

protected property TCustomGrid.AlternateColor : TColor
  read FAlternateColor
  write SetAlternateColor
  stored IsAltColorStored;

Description

AlternateColor is a TColor property with the background color used for alternate rows on the grid control. Color is used as the background color for even-numbered rows. Having alternate rows in different colors can make the grid easier to read.

AlternateColor is initially set to the value for Color property in the constructor. Setting a new value for the property causes the grid control to be redrawn. AlternateColor is updated when a new value is assigned to the Color property; it assumes the old value in Color.

Color and AlternateColor are used in the PrepareCanvas method to set the Canvas brush color for cells which are not selected in a given row.

See also

TCustomGrid.PrepareCanvas

  

Prepares the canvas for drawing the cell at the specified location.

TColor

  

Color type used by most LCL drawing functions.

TControl.Color

  

The background color for the control.


Version 3.2 Generated 2024-02-25 Home