Page 1 of 1

Different cursors for chart and FastLine series

Posted: Wed Jan 04, 2012 7:05 am
by 16060996
Hello,

Different cursors for chart and FastLine series are necessary to us. We set properties chart.cursor and series.cursor, but when mouse moves over series and leaves it, cursor of chart does not change to chart.cursor. What can you recommend?

Best Regards,
Yuri

Re: Different cursors for chart and FastLine series

Posted: Wed Jan 04, 2012 12:24 pm
by 10050769
Hello Yuri,
I suggest you do something as next code, where I have used MouseMove to change the mouse cursor of Chart:

Code: Select all

 public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.FastLine fast1;
 
        private void InitializeChart()
        {
            fast1 = new FastLine(tChart1.Chart);
            fast1.FillSampleValues();
           
            tChart1.MouseMove += new MouseEventHandler(tChart1_MouseMove);
        }

        void tChart1_MouseMove(object sender, MouseEventArgs e)
        {
            if (fast1.Clicked(e.X, e.Y) != -1)
            {
                tChart1.Cursor = Cursors.Hand;
            }
            else
            {
                tChart1.Cursor = Cursors.Arrow;
            }
        }
Can you tell us, if previous code works as you want?

I hope will helps.

Thanks,

Re: Different cursors for chart and FastLine series

Posted: Thu Jan 05, 2012 3:12 pm
by 16060996
Hello, Sandra

Thanks, this method is working.

Best Regards,
Yuri