Skip to main content
Table of Contents

TTMSFNCDataGridCheckedCell Class

Base rendering cell for controls with a checked state; the ancestor of TTMSFNCDataGridCheckBoxCell and TTMSFNCDataGridRadioButtonCell.

API unit family: TMSFNCDataGridCell Inherits from: TTMSFNCDataGridCell

Syntax

GeneratedPascalC++
TTMSFNCDataGridCheckedCell = class(TTMSFNCDataGridCell)
class PASCALIMPLEMENTATION TTMSFNCDataGridCheckedCell : public TTMSFNCDataGridCell

Remarks

On desktop and mobile frameworks the control is painted from a cached bitmap (the checked state is part of the cache key) and only becomes live while the mouse hovers over it; on the web framework the live control is used.

The grid sets Checked from TTMSFNCCustomDataGrid.Booleans and wires OnChange to store the new state and raise TTMSFNCCustomDataGrid.OnCellCheckBoxChange or TTMSFNCCustomDataGrid.OnCellRadioButtonChange. Handle those grid events in application code.

Properties

Name Description
BitmapContainer Bitmap container used to resolve named images, for example in HTML text or in TTMSFNCDataGridBitmapCell.BitmapName. (inherited from TTMSFNCDataGridCell)
Bottom Bottom edge of Rect. (inherited from TTMSFNCDataGridCell)
Checked Checked state shown by the cell. When True, the control is painted checked.
ClipRect Visible part of the grid in which the cell is painted, set by the grid before painting. (inherited from TTMSFNCDataGridCell)
Column Zero-based column index of this cell in the grid. (inherited from TTMSFNCDataGridCell)
Comment Comment text of the cell, displayed in the comment popup when the user clicks the comment indicator. (inherited from TTMSFNCDataGridCell)
CommentIndicator When True, a triangle is painted in the top-right corner of the cell to show that it has a comment; defaults to False. (inherited from TTMSFNCDataGridCell)
CommentIndicatorColor Fill colour of the comment indicator triangle; defaults to gcOrange. (inherited from TTMSFNCDataGridCell)
CommentIndicatorRect Hit and paint rectangle of the comment indicator: a 12 x 12 square (multiplied by Scale) in the top-right corner. (inherited from TTMSFNCDataGridCell)
Control Control displayed in the cell: the application control assigned by the grid, or else the built-in control of the cell class. (inherited from TTMSFNCDataGridCell)
ControlAlign Docking mode of the cell control; defaults to gcaNone. (inherited from TTMSFNCDataGridCell)
ControlClipping When True, a live control is clipped to ClipRect; defaults to True. (inherited from TTMSFNCDataGridCell)
ControlMargins Margins between the cell edges and a docked cell control. (inherited from TTMSFNCDataGridCell)
ControlPosition Placement of the cell control when ControlAlign is gcaNone; defaults to gcpCenterRight. (inherited from TTMSFNCDataGridCell)
ControlRect Rectangle occupied by the cell control, computed from the control size, ControlAlign, ControlPosition, and ControlMargins. (inherited from TTMSFNCDataGridCell)
Coordinate Column and row of this cell as a TTMSFNCDataGridCellCoord. (inherited from TTMSFNCDataGridCell)
Data Cell data item the cell renders; can be nil for a cell without data. (inherited from TTMSFNCDataGridCell)
DrawElements Parts of the cell that are painted and taken into account for layout; defaults to FullElements. (inherited from TTMSFNCDataGridCell)
FilterButton When True, a filter button is painted at the right edge of the cell; defaults to False. (inherited from TTMSFNCDataGridCell)
FilterButtonRect Rectangle of the filter button: a 16 x 16 square (multiplied by Scale) vertically centred at the right edge. (inherited from TTMSFNCDataGridCell)
Height Height of Rect. (inherited from TTMSFNCDataGridCell)
IsExporting True between BeforeExport and AfterExport, while the cell is painted for export. (inherited from TTMSFNCDataGridCell)
Kind Role of this cell in the grid layout (normal, fixed, frozen, and so on). (inherited from TTMSFNCDataGridCell)
Layout Appearance the cell is painted with: fill, stroke, sides, font, and text settings. (inherited from TTMSFNCDataGridCell)
Left Left edge of Rect. (inherited from TTMSFNCDataGridCell)
Rect Cell rectangle in the grid's local coordinate space. (inherited from TTMSFNCDataGridCell)
Right Right edge of Rect. (inherited from TTMSFNCDataGridCell)
Row Zero-based row index of this cell in the grid. (inherited from TTMSFNCDataGridCell)
Scale Scale factor applied to fonts, strokes, glyph sizes, and margins when the cell is painted; 1.0 by default. (inherited from TTMSFNCDataGridCell)
SortIndicator Sort glyph painted in the cell; defaults to gsiNone. (inherited from TTMSFNCDataGridCell)
SortIndicatorRect Rectangle of the sort indicator, placed immediately left of FilterButtonRect and vertically centred. (inherited from TTMSFNCDataGridCell)
Text Text painted in the cell: the TTMSFNCDataGridCellItem.DisplayValue of Data, or an empty string when there is no data. (inherited from TTMSFNCDataGridCell)
TextRect Rectangle in which the text is painted. (inherited from TTMSFNCDataGridCell)
Top Top edge of Rect. (inherited from TTMSFNCDataGridCell)
Width Width of Rect. (inherited from TTMSFNCDataGridCell)

Methods

Name Description
AfterExport Called by the grid when an export pass ends; resets IsExporting to False. (inherited from TTMSFNCDataGridCell)
BeforeExport Called by the grid before the cell is painted for export; sets IsExporting to True. (inherited from TTMSFNCDataGridCell)
ClearControlCache Discards the cached bitmap of the cell control, including its entry in the shared control cache, so it is captured again on the next paint. (inherited from TTMSFNCDataGridCell)
Draw Paints the complete cell: applies the layout fill, stroke, and font, raises the before-draw notification, then calls DrawBackground and DrawContent and raises the after-draw notification. (inherited from TTMSFNCDataGridCell)
DrawBackground Paints the cell rectangle with the current fill and stroke, stroking only the TTMSFNCDataGridCellLayout.Sides of the layout. (inherited from TTMSFNCDataGridCell)
DrawCommentIndicator Paints the comment triangle in the top-right corner of the cell in CommentIndicatorColor. (inherited from TTMSFNCDataGridCell)
DrawContent Prepares the cell control and paints the content layers: text, control, comment indicator, sort indicator, and filter button. (inherited from TTMSFNCDataGridCell)
DrawControl Paints the cell control from its cached bitmap in ControlRect. (inherited from TTMSFNCDataGridCell)
DrawFilterButton Paints the filter icon in FilterButtonRect. (inherited from TTMSFNCDataGridCell)
DrawSortIndicator Paints the ascending or descending sort glyph in SortIndicatorRect, preceded by the sort order number when several columns are sorted. (inherited from TTMSFNCDataGridCell)
DrawText Paints Text in TextRect using the alignment, wrapping, trimming, and angle of the layout, clipped to the cell rectangle. (inherited from TTMSFNCDataGridCell)
HandleKey Processes a key event for the cell. The base implementation does nothing; descendants override it to react to keys. (inherited from TTMSFNCDataGridCell)
HandleMouse Processes a mouse event for the cell: clicks on the filter button, the comment indicator, and a cached control, and switching a cached control to its live version while the mouse hovers over it. (inherited from TTMSFNCDataGridCell)
IsHTML Returns True when the cell text looks like HTML markup. (inherited from TTMSFNCDataGridCell)
ReInitialize Recycles this cell for another coordinate and data item without creating a new object. (inherited from TTMSFNCDataGridCell)
XYToAnchor Returns the anchor (href) under the given position in the HTML text of the cell. (inherited from TTMSFNCDataGridCell)

Events

Name Description
OnChange Occurs after the user toggles the state with a click, a double-click, or the Space key, once Checked holds the new value.