[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Gets the truncated hint text for the specified cell.
Source position: dbgrids.pas line 482
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 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.
Version 3.2 | Generated 2024-02-25 | Home |