Different cursors for chart and FastLine series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Yuri
Newbie
Newbie
Posts: 6
Joined: Fri Dec 09, 2011 12:00 am

Different cursors for chart and FastLine series

Post by Yuri » Wed Jan 04, 2012 7:05 am

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

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

Re: Different cursors for chart and FastLine series

Post by Sandra » Wed Jan 04, 2012 12:24 pm

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

Yuri
Newbie
Newbie
Posts: 6
Joined: Fri Dec 09, 2011 12:00 am

Re: Different cursors for chart and FastLine series

Post by Yuri » Thu Jan 05, 2012 3:12 pm

Hello, Sandra

Thanks, this method is working.

Best Regards,
Yuri

Post Reply