Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2477

Summary: OnShowHint does not work
Product: VCL TeeChart Reporter: h.hasenack <hans>
Component: TTreeAssignee: yeray alonso <yeray>
Status: RESOLVED FIXED    
Severity: normal CC: yeray
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description h.hasenack 2021-10-28 06:56:25 EDT
The check wheter the mous is inside the tree is faulty.

Here's the patch to make it work, around line 11650 in TeeTree.pas


  // Returns True if mouse is inside any shape or shape "cross-box"...
  Function CheckMouseShapes:Boolean;
....
        if NeedsHint then
        begin
          P:=Canvas.Calculate3DPosition(X1,Y1,TeeTreeZ);
{$ifdef HH_PATCH_MOUSEMOVE_NEEDSHINT}
          NeedsHint:=ChartBounds.Contains(P);
{$else}
          NeedsHint:=(P.X>ChartBounds.Right) or (P.Y>ChartBounds.Bottom);
{$endif}

          if not NeedsHint then
          begin
            P:=Canvas.Calculate3DPosition(X0,Y0,TeeTreeZ);
{$ifdef HH_PATCH_MOUSEMOVE_NEEDSHINT}
            NeedsHint:=ChartBounds.Contains(P);
{$else}
            NeedsHint:=(P.X<ChartBounds.Left) or (P.Y<ChartBounds.Top);
{$endif}
          end;
        end;
....
Comment 1 yeray alonso 2021-11-05 16:36:11 EDT
I've just implemented your fix proposal.
Note I've used "PointInRect(TRect, TPoint)" function instead of "TRect.Contains", to support older IDEs.

Thank you!