TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
TonyHunt
- Newbie

- Posts: 15
- Joined: Mon Jan 15, 2007 12:00 am
Post
by TonyHunt » Mon Aug 17, 2009 12:09 pm
Hi,
I would like to prevent the OnMouseMove event triggering when the cursor is NOT over the actual chart drawing area.
Is this possible?
By the way what is the correct terminology for "the actual chart drawing area"
Tony
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Tue Aug 18, 2009 9:49 am
Hi Tony,
I'm afraid you should test if the mouse cursor is in the target area manually:
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var dummyPoint: TPoint;
begin
dummyPoint.X := X;
dummyPoint.Y := Y;
if PtInRect(Chart1.ChartRect, dummyPoint) then
begin
//your code
end;
end;
So if you mean the rectangle formed by the left and the bottom axes, we call it "ChartRect".

-
TonyHunt
- Newbie

- Posts: 15
- Joined: Mon Jan 15, 2007 12:00 am
Post
by TonyHunt » Mon Aug 24, 2009 10:27 am
Thank you very much, that's exactly what I needed.
Please let me know if you ever get to visit the U.K.,
I would be delighted to introduce you to a quaint old English custom called "Pub Crawling".
Tony
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Mon Aug 24, 2009 11:26 am
Hi Tony,
It's a pleasure trying to be helpful!
Thanks for the invitation! It looks culturally really interesting!
