Gets the truncated hint text for the specified cell.
Source position: dbgrids.pas line 478
protected function TCustomDBGrid.GetTruncCellHintText( |
aCol: Integer; |
aRow: Integer |
):string; override; |
aCol |
|
Column number for the cell hint text. |
aRow |
|
Row number for the cell hint text. |
Contains the hint text for the cell derived in the method.
GetTruncCellHintText is an overridden method in TCustomDBGrid. It re-implements the method from the ancestor class, and does not call the inherited method.
GetTruncCellHintText is used to get the truncated hint text (shortened with an Ellipsis appended) for the cell specified in the ACol and ARow arguments. No actions are performed in the method if ARow is one of the FixedRows for the grid control; the return value is an empty string ('') in this situation.
GetTruncCellHintText calls GetFieldFromGridColumn to get the TField instance which provides the data for the column in ACol. The DataType for the TField instance determines the content stored in the return value. For example:
Other values in DataType cause the DisplayText for the field to be be used as the cell hint text.
The cell hint text is an empty string ('') if a field type was not found for the specified column number, or field data for the cell contains an unassigned or NULL value (TField.IsNull returns True). This is also the cell hint returned when the dataset for the grid is empty.
The OnGetCellHint event handler is signalled (when assigned) if CellHintPriority is set to chpTruncOnly. This allows the TColumn instance for the cell to be used to override the value for the cell hint text or to truncate the value to a specific length.
GetTruncCellHintText is called from the ShowCellHintWindow method in the ancestor class.
|
GetFieldFromGridColumn obtain the Field either from a Db column or directly from dataset Fields. |
|
|
Indicates if the field is a Memo that needs to be displayed in the grid. |
|
|
Event handler signalled to get the hint text for a cell in the grid control. |
|
|
Number of the fixed rows in the grid. |
|
|
Returns the grid column definition at the specified position in Columns. |
|
|
Identifies how text is combined to form the Hint property. |
|
|
Represents the cell hint display priorities. |
|
| Version 4.6 | Generated 2026-02-20 | Home |