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