OnMouseMove outside the chart & holding right mouse butt

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
amir6821
Newbie
Newbie
Posts: 5
Joined: Wed Apr 26, 2006 12:00 am
Contact:

OnMouseMove outside the chart & holding right mouse butt

Post by amir6821 » Tue Sep 30, 2008 12:39 pm

Hi

I want to draw a zoom-like rectangle with use of right mouse button, i have read this article http://www.teechart.net/support/viewtop ... 1566#31566 and this one http://www.teechart.net/support/viewtop ... +rectangle and they solved my problem, except that OnMouseMove event doesn't work for right mouse button when leaving the chart. How zoom function with left mouse button get events outside of the chart? and how can i do the same for right mouse button?

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Sep 30, 2008 1:32 pm

Hi amir6821,

I'm sorry but I don't understand which is your exact problem. Could you please give us some more details about it? If you want you can send a simple example project we can run "as-is" to reproduce the problem here at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

amir6821
Newbie
Newbie
Posts: 5
Joined: Wed Apr 26, 2006 12:00 am
Contact:

OnMouseMove

Post by amir6821 » Wed Oct 08, 2008 2:31 pm

Hi

I attached a file (Project1.zip) that contains the example. when i click the right mouse button and drag it, it shows the mouse coordination in Edit boxes, but when then mouse goes out of the chart boundries OnMouseMove event doesn't hook the mouse motion. Is it a way to hook mouse movement out of chart like zooming with left mouse button?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 08, 2008 2:53 pm

Hi amir6821,

Thanks for the example project. What about using form's OnMouseMove event too? For example:

Code: Select all

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if Selecting then
  begin
    Edit1.Text:=IntToStr(X - Chart1.Left);
    Edit2.Text:=IntToStr(Y - Chart1.Top);
  end
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply