Problems with redefine keys for Panning

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
alex
Newbie
Newbie
Posts: 9
Joined: Tue Aug 16, 2005 4:00 am

Problems with redefine keys for Panning

Post by alex » Fri Jun 30, 2006 1:50 pm

Hello!

I can easily redefine keys for TChart zooming with the help of TChart.Zoom.MouseButton and TChart.Zoom.KeyShift properties. But it is impossible for panning because TChart has only TChart.Panning.MouseButton but hasn't TChart.Panning.KeyShift property.

For example I can't define Alt+Left mouse button to scroll TChart.

Is it possible to add TChart.Panning.KeyShift property?

Thanks in advance,
Alex

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

Post by Narcís » Fri Jun 30, 2006 3:46 pm

Hi Alex,

Yes, I'll add it to our wish-list to be implemented for future releases. In the meantime you can do something like this:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      bar1.FillSampleValues();
      bar2.FillSampleValues();
      bar3.FillSampleValues();

      tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None;
      tChart1.Zoom.Allow = false;
    }

    private void tChart1_KeyDown(object sender, KeyEventArgs e)
    {
      if (e.Modifiers == Keys.Alt)
      {
        tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.Both;
      }
    }

    private void tChart1_MouseUp(object sender, MouseEventArgs e)
    {
        tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None;
    }
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