RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBGrid.DefaultDrawing Property

Indicates whether the cells in the data-aware grid are drawn automatically.

Pascal
property DefaultDrawing: Boolean;
C++
__property Boolean DefaultDrawing;__property Boolean DefaultDrawing;

Set DefaultDrawing to true to allow the data-aware grid to draw the data in the cells of the grid automatically. Set DefaultDrawing to false to turn off the default drawing when providing customized painting in an OnDrawColumnCell event handler or an OnDrawDataCell event handler.  

When DefaultDrawing is true, the data-aware grid fetches the data for each cell from the appropriate entry in the Fields array, and writes it to the cell. It then draws the focus rectangle if the cell has focus, or if the cell is selected and the Options property includes dgAlwaysShowSelection. 

When DefaultDrawing is false, the data-aware grid draws the appropriate background color on the cell and sets up the brush and font described by the appropriate TColumn object. However, the value of the field is not written to the cell, and no focus rectangle is drawn. 

 

Columns 

Fields 

OnDrawColumnCell 

OnDrawDataCell 

TColumn 

Controlling Grid Drawing

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!