Disable zoom & move

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
user2016
Newbie
Newbie
Posts: 6
Joined: Wed Mar 02, 2016 12:00 am

Disable zoom & move

Post by user2016 » Mon Aug 01, 2016 4:11 am

Hi there, I would like to disable zoom and move by default and only enable it when enable the function when user click from ChartController.

The old codes used to be Zoom.Allow which I couldn't find the options. I have tried tChart.Zoom.Active = false; and tChart.Panning.Allow = Steema.TeeChart.ScrollModes.None;
Both codes doesn't work.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Disable zoom & move

Post by Sandra » Mon Aug 01, 2016 10:20 am

Hello user2016,

I would like suggest you use Zoom Directions to disable the Zoom and Panning. Allow to disable the Scroll. The code below works in my end:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tChart1.Series.Add(typeof(Line)).FillSampleValues();
            tChart1.Zoom.Direction = ZoomDirections.None;
            tChart1.Panning.Allow = ScrollModes.None;
      }
Hoping this helps you
Thanks in advance
Best Regards,
Sandra Pazos / 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

user2016
Newbie
Newbie
Posts: 6
Joined: Wed Mar 02, 2016 12:00 am

Re: Disable zoom & move

Post by user2016 » Wed Aug 03, 2016 4:01 am

Hi Sandra,

Thanks for the suggestion, it works!

Post Reply