ToolTip when text hav been truncated

Hi.

Is there a built in solution for showing the full text as a ToolTip when the text is too long to fit inside a cell?

If not - any solution?

Br

Petter

Hi, 


you can use a comment grid cell for additional content:

  TMSFMXGrid1.Cells[3, 3] := 'Text';
  TMSFMXGrid1.Comments[3, 3] := 'Additional Text';

The small triangle in the upper corner can be used to display the text in a tooltip.

Kind Regards, 
Scheldeman Pieter

I think the problem lies in how I can know when a text has been truncated...

Any ideas?

Petter

Each cell is of type TTMSFMXGridCell which has a GetTextWidth function. You can use this function after getting the object of the cell with   TMSFMXGrid1.GetCellObject() and compare it with the column width (ColumnWidths property).

If the width exceeds the cell width, then a tooltip can be presented. The parameter for the GetCellObject function accepts a TCell record which has a row and col property.

Kind Regards, 
Pieter