Index: JvDBGrid.pas
===================================================================
--- JvDBGrid.pas	(revision 13188)
+++ JvDBGrid.pas	(working copy)
@@ -104,6 +104,7 @@
   {$ENDIF BCB}
 
   TJvDBGridColumnResize = (gcrNone, gcrGrid, gcrDataSet);
+  TJvDBGridCellHintPosition = (gchpDefault, gchpMouse);
 
   TSelectColumn = (scDataBase, scGrid);
   TTitleClickEvent = procedure(Sender: TObject; ACol: Longint;
@@ -291,6 +292,7 @@
     FRowResize: Boolean;
     FRowsHeight: Integer;
     FTitleRowHeight: Integer;
+    FCellHintPosition: TJvDBGridCellHintPosition;
     FCanDelete: Boolean;
 
     { Cancel edited record on mouse wheel or when resize column (double-click)}
@@ -591,6 +593,10 @@
       default JvGridResizeProportionally;
     property SelectColumnsDialogStrings: TJvSelectDialogColumnStrings
       read FSelectColumnsDialogStrings write SetSelectColumnsDialogStrings;
+
+    { Determines how cell hint position is calculated Mantis #5759, check TJvDBGrid.CMHintShow }
+    property CellHintPosition: TJvDBGridCellHintPosition read FCellHintPosition write FCellHintPosition default gchpDefault;
+
     { Allows user to delete things using the "del" key }
     property CanDelete: Boolean read FCanDelete write FCanDelete default True;
 
@@ -4452,11 +4458,15 @@
   ACol, ARow, ATimeOut, SaveRow: Integer;
   AtCursorPosition: Boolean;
   CalcOptions: Integer;
+  InitialMousePos: TPoint;
   HintRect: TRect;
 begin
   AtCursorPosition := True;
   with Msg.HintInfo^ do
   begin
+    { Save the position of mouse cursor }
+    InitialMousePos := Mouse.CursorPos;
+
     HintStr := GetShortHint(Hint);
     ATimeOut := HideTimeOut;
     Self.MouseToCell(CursorPos.X, CursorPos.Y, ACol, ARow);
@@ -4491,7 +4501,7 @@
 
     if FShowTitleHint and (ACol >= 0) and (ARow <= -1) then
     begin
-      AtCursorPosition := False;
+      AtCursorPosition := FCellHintPosition = gchpMouse;
       HintStr := Columns[ACol].FieldName;
       ATimeOut := Max(ATimeOut, Length(HintStr) * C_TIMEOUT);
       if Assigned(FOnShowTitleHint) and DataLink.Active then
@@ -4502,7 +4512,7 @@
     if FShowCellHint and (ACol >= 0) and DataLink.Active and
       ((ARow >= 0) or not FShowTitleHint) then
     begin
-      AtCursorPosition := False;
+      AtCursorPosition := FCellHintPosition = gchpMouse;
       HintStr := Hint;
       SaveRow := DataLink.ActiveRecord;
       try
@@ -4555,7 +4565,9 @@
     end;
 
     if not AtCursorPosition and HintWindowClass.ClassNameIs('THintWindow') then
-      HintPos := ClientToScreen(CursorRect.TopLeft);
+      HintPos := ClientToScreen(CursorRect.TopLeft)
+    else
+      HintPos := InitialMousePos;
   end;
   inherited;
 end;
