Skip to main content
Table of Contents

TTMSFNCDataGridRenderer.OnGetCellLayout Event

Fired for each displayed cell to let the application override its visual layout (fill, stroke, font, text alignment and similar).

API unit family: TMSFNCDataGridRenderer Declaring type: TTMSFNCDataGridRenderer

Syntax

FMX.TMSFNCDataGridRenderer.hppPascalC++
OnGetCellLayout: TTMSFNCDataGridGetCellLayoutEvent;
__property TTMSFNCDataGridGetCellLayoutEvent OnGetCellLayout = {read=FOnGetCellLayout, write=FOnGetCellLayout};

Remarks

Fires when a cell is configured for display, after the state layout, the cell-level layout and conditional formatting have been applied, so changes made here win. It also fires for cells rendered during HTML export.

The cell object is recycled; do not keep a reference. Keep the handler fast, and base decisions on the cell data rather than on painting order. This is the preferred way to colour cells dynamically, instead of storing per-cell Layouts.

Parameters

Name Description
Sender Renderer that fired the event.
ACell Cell object whose layout can be customized. Modify ACell.Layout; ACell.Column, ACell.Row and the cell state identify what is being painted.