Hi All,
I'm using a TStringGrid (has to be Delphi 7, and no 3rd party components) I've customised it to allow per-cell colouring/fonts/borders/validation etc, by using a custom onDrawCell method.
I really would like to add per-cell tooltips too, but I've been unsuccessful so far. I've modified something I found:
procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
acol, arow: integer;
P : TPoint;
Re: TRect;
begin
Re := StringGrid1.CellRect(acol, arow);
P.X := Re.Bottom;
P.Y := Re.Right;
StringGrid1.Hint := getHint(acol, arow);
Application.HintColor := clYellow;
Application.ActivateHint(P);
end;
Which kind of works, but it tries to display the tooltip every px moved, making it very laggy, and it displays it without having to "pause" for a while, like you do with regular tooltips.
If anyone knows of an easier/proper way to implement this it would be much appreciated.
Thanks in advance.