Cell Hint Position is Bad location(Very top from real Cell position)
please check attach file
Posted 25 April 2013 - 06:12 PM
Posted 25 April 2013 - 06:36 PM
procedure TNxCustomGrid.ShowCellHint(ACol, ARow: Integer; HintText: WideString);
var
HintRect: TRect;
APoint: TPoint;
HintLeft: Integer;
begin
if not ParentFormActive(Self) then Exit;
if not Application.ShowHint then Exit;
RecreateHintWnd;
FHintPosition := hpCellHint;
HintRect := GetCellRect(ACol, ARow);
case GridStyle of
gsReport: HintLeft := HintRect.Left + Columns[ACol].Width;
else HintLeft := HintRect.Left + Columns[ACol].SlideBounds.Width;
end;
if HintLeft > ClientWidth then HintLeft := ClientWidth;
APoint := ClientToScreen(Point(HintLeft, HintRect.Top - 20)); // <-----------------------------
HintRect := CalcHintRect(FHintWindow, 250, HintText);
OffsetRect(HintRect, APoint.X, APoint.Y);
ActivateHint(FHintWindow, HintRect, HintText);
end;
0 members, 1 guests, 0 anonymous users