TeeChart and the Arrow keys

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

TeeChart and the Arrow keys

Post by Snarkle » Wed Oct 19, 2011 11:13 pm

Greetings,

I wish to use teh right and left arrow keys to move a Cursor Tool left and right continuously .. i.e. hold down an arrow key and cursor tool moves until you let go of the key.

http://www.teechart.net/support/viewtop ... arrow+keys
Now this post tells me why I cant do that and has a fix that involves creating a class that inherits TeeChart and overloads some key
handling ....

My project has far too many references to TeeChart in it to be able to go down this path ... however we have sourcecode TeeChart which we have added all sorts of tools and chart types to ... is there a solution that achieves the same outcome (Arrow Key Down events) that we could put into the SourceCode Teechart Version and where can we put it?

Kind reagrds Phil.
--------------------
Cheers Phil.

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

Re: TeeChart and the Arrow keys

Post by Sandra » Thu Oct 20, 2011 11:09 am

Hello Phil,

You can add the code that Narcís suggest in this thread in your source code or in your application. If you want implement the override method in your source code, you only need add next code in the class TChart that you find in the TeeChart.cs file:

Code: Select all

 protected override bool IsInputKey(Keys key)
    {
      switch (key)
      {
        case Keys.Up:
        case Keys.Down:
        case Keys.Right:
        case Keys.Left:
          return true;
      }
      return base.IsInputKey(key);
    }
Please, add it code in your source code and tell us if our suggestion works as you want?

I hope will helps.

Thanks,
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

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: TeeChart and the Arrow keys

Post by Snarkle » Thu Oct 20, 2011 11:54 pm

Works perfectly I am now in ArrowKey.Down heaven ... ;-)
--------------------
Cheers Phil.

Post Reply