TTMSFNCDataGridCell Class
Base rendering cell for a single grid cell; holds layout, data, draw elements, kind, coordinate, rect, scale, and optional embedded controls.
API unit family: TMSFNCDataGridCell
Syntax
TTMSFNCDataGridCell = class
Remarks
Subclassed for node, checkbox, radio-button, button, progress-bar, and bitmap cells. Instances are pooled and re-used by the renderer via ReInitialize; do not hold long-lived references. Use TTMSFNCDataGridCellHelper to safely cast to a specific subclass.
Properties
| Name | Description |
|---|---|
| BitmapContainer | Optional bitmap container used to resolve named bitmaps referenced by BitmapName. |
| Bottom | Bottom edge of the cell rectangle in canvas coordinates. |
| ClipRect | Clipping rectangle applied during drawing; typically the visible viewport intersection. |
| Column | Zero-based column index of this cell in the grid. |
| Comment | Comment text shown in the tooltip and as the comment indicator when CommentIndicator is True. |
| CommentIndicator | When True a small triangle is drawn in the cell corner to indicate the presence of a Comment; defaults to False. |
| CommentIndicatorColor | Colour of the comment indicator triangle; defaults to gcOrange. |
| CommentIndicatorRect | Bounding rectangle of the comment indicator triangle within the cell. |
| Control | The live embedded VCL/FMX control displayed inside the cell, if any. |
| ControlAlign | Docking mode for the embedded control; defaults to gcaNone. |
| ControlClipping | When True the embedded control is clipped to the cell bounds; defaults to True. |
| ControlMargins | Margins applied around the embedded control within the cell content area. |
| ControlPosition | Nine-point placement position for the embedded control when ControlAlign is gcaNone; defaults to gcpCenterRight. |
| ControlRect | Computed rectangle occupied by the embedded control within the cell. |
| Coordinate | Column/row coordinate of this cell expressed as a TTMSFNCDataGridCellCoord record. |
| Data | The cell data item providing Value, DisplayValue, and extended metadata. |
| DrawElements | Set of draw elements painted during the next Draw call; defaults to FullElements. |
| FilterButton | When True an inline filter button is drawn in the cell; defaults to False. |
| FilterButtonRect | Bounding rectangle of the filter button glyph within the cell. |
| Height | Height of the cell rectangle in logical pixels. |
| IsExporting | True while the grid is performing an export render pass; False during normal display. |
| Kind | Structural kind of this cell (data, fixed header, frozen pane, etc.). |
| Layout | Appearance layout controlling fill, font, borders, and text style for this cell. |
| Left | Left edge of the cell rectangle in canvas coordinates. |
| Rect | Bounding rectangle of the cell in canvas coordinates. |
| Right | Right edge of the cell rectangle in canvas coordinates. |
| Row | Zero-based row index of this cell in the grid. |
| Scale | Display scale factor (DPI scaling) applied when rendering this cell. |
| SortIndicator | Sort-direction glyph shown in fixed header cells; defaults to gsiNone. |
| SortIndicatorRect | Bounding rectangle of the sort indicator glyph within the cell. |
| Text | The text string rendered in this cell, derived from DisplayValue or the formatted Value. |
| TextRect | Computed rectangle available for text rendering after reserving space for the control, sort indicator, and filter button. |
| Top | Top edge of the cell rectangle in canvas coordinates. |
| Width | Width of the cell rectangle in logical pixels. |
Methods
| Name | Description |
|---|---|
| AfterExport | Called by the grid after export is complete; restores any state changed by BeforeExport. |
| BeforeExport | Called by the grid before export begins; prepares the cell for export rendering. |
| ClearControlCache | Invalidates and releases the cached control bitmap so the control is re-rendered on the next draw. |
| Draw | Performs a full repaint of the cell using AGraphics; calls DrawBackground, DrawContent, and all other draw sub-steps. |
| DrawBackground | Draws the cell background fill and border stroke according to the current Layout. |
| DrawCommentIndicator | Draws the comment indicator triangle in the cell corner when CommentIndicator is True. |
| DrawContent | Draws all cell content (text, control, sort indicator, filter button, comment indicator). |
| DrawControl | Draws the embedded control bitmap or live control within the cell's control rectangle. |
| DrawFilterButton | Draws the inline filter button glyph when FilterButton is True. |
| DrawSortIndicator | Draws the sort-direction indicator glyph according to SortIndicator. |
| DrawText | Draws the cell text string inside the TextRect according to the current Layout alignment and trimming settings. |
| HandleKey | Delivers a keyboard event to the cell; subclasses override to handle key interactions. |
| HandleMouse | Delivers a mouse event to the cell; subclasses override to handle mouse interactions. |
| IsHTML | Returns True when the cell's text contains HTML markup that the renderer should parse. |
| ReInitialize | Re-initialises a pooled cell instance with new coordinates and data without allocating a new object. |
| XYToAnchor | Returns the anchor URL at canvas position (X, Y) within the cell, or an empty string when no anchor is hit. |