Undo Scroll ?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Windwalker
Newbie
Newbie
Posts: 14
Joined: Mon Apr 20, 2009 12:00 am

Undo Scroll ?

Post by Windwalker » Thu May 28, 2009 8:45 am

Hi there,

I have a TChart, which the user can scroll and zoom using the left and right mouse buttons.

Now I look for a way to undo zoom and scroll actions, i.e. to reset the chart.
UndoZoom does exist, but how can I do the same for the scrolling?

Thanks for the help!

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Thu May 28, 2009 9:25 am

Hi Windwalker,

Are you zooming and/or scrolling your chart manually? Or are you using the default zoom and scroll features?

By default, you can zoom the chart with left mouse button, drawing a rectangle (dragging left mouse button to the bottom right) in the zone you would like to zoom in.

By default, you can scroll your chart dragging the chart with right mouse button.

And also by default, you can undo both zoom and scroll actions drawing a "inverse" rectangle (dragging left mouse button to the top left).

If you changed your axes at runtime, you could restore the default view forcing them to be automatic:

Code: Select all

  Chart1.Axes.Bottom.Automatic := true;
  Chart1.Axes.Left.Automatic := true;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Windwalker
Newbie
Newbie
Posts: 14
Joined: Mon Apr 20, 2009 12:00 am

Post by Windwalker » Thu May 28, 2009 9:34 am

9348257 wrote:Hi Windwalker,

If you changed your axes at runtime, you could restore the default view forcing them to be automatic:

Code: Select all

  Chart1.Axes.Bottom.Automatic := true;
  Chart1.Axes.Left.Automatic := true;
Thanks, that's it!

Post Reply