Page 1 of 1

Scroll Trace Window

Posted: Thu Jun 03, 2010 8:41 am
by 10047047
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

Re: Scroll Trace Window

Posted: Thu Jun 03, 2010 10:41 am
by narcis
Hi Xia,

Have you tried setting ClipPoints to false? For example:

Code: Select all

  Chart1.ClipPoints:=False;

Re: Scroll Trace Window

Posted: Thu Jun 03, 2010 4:23 pm
by 10047047
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

Re: Scroll Trace Window

Posted: Thu Jun 03, 2010 5:34 pm
by narcis
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!

Re: Scroll Trace Window

Posted: Fri Jun 04, 2010 8:57 am
by 10047047
Thanks Narcis. It works fine.

Xia