In a StringGrid component descendant, I want to change the popup Hint message depending on the value of a cell. My coding:
procedure TForm.GridMouseEnterCell(Sender: TObject; ACol, ARow: Integer);
var k: integer;
begin
k := strtointdef(Grid.Cells[13, ARow],-1);
Grid.ShowHint := (ACol = 12) and (k >= 0);
if Grid.ShowHint then
Grid.Hint := MyLIst.Items[k];
end;
This works fine when I mouse over to Col 12 from another column, but if stay in col 12 and move to another row (with a different value of k), the popup hint does not change. It will only show the correct/new hint when I first mouse over to another column, and then back to col 12. Anyone have a solution?