Scroll Trace Window

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Xia
Newbie
Newbie
Posts: 47
Joined: Tue Oct 16, 2007 12:00 am

Scroll Trace Window

Post by Xia » Thu Jun 03, 2010 8:41 am

Hi,

I am writing a trace display application using TChart and would like to scroll the trace when pressing and holding the left mouse button outside of the ChartRect, left side to scroll trace to the left and right side to scroll the trace to the right. I have added BottomAxis->SetMinMax() in the mouse move event. But it requires constant mouse move to scoll the trace. How can I scroll the trace when holding the mouse down outside the ChartRect without moving the mouse?

Regards

Xia

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

Re: Scroll Trace Window

Post by Narcís » Thu Jun 03, 2010 10:41 am

Hi Xia,

Have you tried setting ClipPoints to false? For example:

Code: Select all

  Chart1.ClipPoints:=False;
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

Xia
Newbie
Newbie
Posts: 47
Joined: Tue Oct 16, 2007 12:00 am

Re: Scroll Trace Window

Post by Xia » Thu Jun 03, 2010 4:23 pm

Dear Narcis,

Thanks for your reply.

Sorry, I may not explain that clearly. I have traces displayed on the chart. When I move the mouse to the left side or right side of the chart rect area (outside the chart plotting area) and then press down and hold the left mouse button, I want to scroll the traces left or right continuously until releasing the mouse button. I added SetMinMax() function in the mouse move event to scroll the traces but I have to keep moving the mouse for continuous scrolling. Is there an event respond to mouse down and holding so I can add functions to check mouse position and setminmax() if outside the chart rect area to scroll the traces?

Regards

xia

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

Re: Scroll Trace Window

Post by Narcís » Thu Jun 03, 2010 5:34 pm

Hi Xia,

In that case I'd use a TTimer which by default is disabled and is enabled in the OnMouseDown event and disabled in the OnMouseUp event. In TTimer's OnTimer event I'd increase axis minimum and maximum using SetMinMax.

Hope this helps!
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

Xia
Newbie
Newbie
Posts: 47
Joined: Tue Oct 16, 2007 12:00 am

Re: Scroll Trace Window

Post by Xia » Fri Jun 04, 2010 8:57 am

Thanks Narcis. It works fine.

Xia

Post Reply