Page 1 of 1

TeeChart and the Arrow keys

Posted: Wed Oct 19, 2011 11:13 pm
by 8751509
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.

Re: TeeChart and the Arrow keys

Posted: Thu Oct 20, 2011 11:09 am
by 10050769
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,

Re: TeeChart and the Arrow keys

Posted: Thu Oct 20, 2011 11:54 pm
by 8751509
Works perfectly I am now in ArrowKey.Down heaven ... ;-)