There are two types of cell-specific hints:
- "normal" hints which can display any cell-related text. The text is defined in the OnGetCellHint event. They are activated by adding goCellHints (gdCellHints in case of the DBGrid) to the grid's Options.
- "truncated cell hints", i.e. the hints for cell in which the text has been truncated because the cell with is too small (that's what you need). They are activated by adding goTruncCellHints (dgTruncCellHints in case of the DBGrid) to the grid's Options.
So, the first solution is to replace the dgCellHints by dbTruncCellHints when you set up the grid's Options.
Both kinds of cell hints can be combined, and even the normal Hint of the grid (DBGrid.Hint) can be included. What finally is shown is determined by the CellHintPriority property:
- chpAll: display all three hint texts
- chpAllNoDefault: display "normal" cell hints and "truncated cell hints", but not DBGrid.Hint
- chpTruncOnly: display only the truncated cell hints.
Therefore the second solution would be to replace the chpTruncOnly by chpAllNoDefault (since there is no OnGetCellHint handler the normal cell hint would not be shown).
Select one of the two solutions.