RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDrawGrid.OnDrawCell Event

Occurs when a cell in the grid needs to be drawn.

Pascal
property OnDrawCell: TDrawCellEvent;
C++
__property TDrawCellEvent OnDrawCell;

Write an OnDrawCell event handler to draw the contents of all the cells in the grid. Draw on the cell using the methods of the Canvas property.  

If the OnDrawCell event handler is not assigned, all cells in the draw grid will appear empty. If the DefaultDrawing property is true, the draw grid paints the background color of the cell before the OnDrawCell event, and draws a focus rectangle around the selected cell after the OnDrawCell event handler finishes drawing the contents of the cell. If the DefaultDrawing property is false, the OnDrawCell event handler should paint the background of the cell and provide all visual indication of selection and focus. 

 

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