Vcl.DBGrids.TCustomDBGrid.DefaultDrawing

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property DefaultDrawing: Boolean read FDefaultDrawing write FDefaultDrawing default True;

C++

__property bool DefaultDrawing = {read=FDefaultDrawing, write=FDefaultDrawing, default=1};

Properties

Type Visibility Source Unit Parent
property protected
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TCustomDBGrid

Description

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

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.

See Also