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

TCustomGrid.DefaultDrawing

Indicates if the default drawing mechanism is used to draw the background and text for cells.

Declaration

Source position: grids.pas line 1238

protected property TCustomGrid.DefaultDrawing : Boolean
  read FDefaultDrawing
  write SetDefaultDrawing
  default True;

Description

DefaultDrawing is a Boolean property which indicates if the default drawing mechanism is used to draw the background and text for the cells on the grid control. The default value for the property is True.

Normally, the grid prepares its canvas using the properties needed for the kind cell type that is being painted. DefaultDrawing indicates that the grid control handles drawing the background and text for the cell (including a visible cell Editor) using the relevant properties.

Use the OnDrawCell event handler to handle drawing a cell using an appearance different than the default provided in PrepareCanvas. When DefaultDrawing is set to False, the OnDrawCell event handler is responsible for both the background and text content in the cell.

Changing the value for the property causes the Invalidate method to be called to redraw the control.

DefaultDrawing is used in the PrepareCanvas method to configure the control Canvas for a drawing operation. It is also used in the DrawCell method in descendent classes.

See also

TCustomDrawGrid.DrawCell

  

Draws the the content for the cell specified in the ACol and ARow arguments.


Version 3.2 Generated 2024-02-25 Home