Skip to main content
Table of Contents

TTMSFNCDataGridBeforeDrawCellEvent Event Type

Fired before a cell is painted. Set ACanDraw to False to skip the default drawing and take full control via AGraphics.

API unit family: TMSFNCDataGridRenderer

Remarks

Fires on every paint of a visible cell, so keep handlers fast. To only change colours or fonts, prefer OnGetCellLayout.

Parameters

Name Description
Sender The grid renderer.
AGraphics Graphics context, already initialised with the fill, stroke and font of the cell layout.
ACell The cell about to be painted; ACell.Rect gives its bounds and ACell.Layout its resolved layout.
ACanDraw Defaults to True. Set to False to skip the default background and content drawing; the after-draw event is then not fired either.