Jump to content


Photo

Hint Position


  • Please log in to reply
1 reply to this topic

#1 john123

john123
  • Members
  • 5 posts

Posted 25 April 2013 - 06:12 PM

Hi Boki
Cell Hint Position is Bad location(Very top from real Cell position)
please check attach file

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 25 April 2013 - 06:36 PM

Hello John,

Maybe this hint control is differently done than standard one.

Can you please try to modify line inside next procedure:


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;

boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users