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 - OnShowHint does not work
Summary: OnShowHint does not work
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: TTree (show other bugs)
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: yeray alonso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-28 06:56 EDT by h.hasenack
Modified: 2021-11-05 16:36 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!