Profile Picture

Cannot change Cursor if mouse is over a DataPoint

Posted By Alexander Haberl 10 Years Ago
Author
Message
Alexander Haberl
Problem Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 15, Visits: 48
Since I upgraded to 2014.1 the following code does not work anymore (in 2012.1 it worked perfectly), the Cursor does not change (sometimes it flickers for a bit):
Also I noticed that in the C# examples (Interactivity->Mouse Events->Tracking Mouse Events), if you change the render mode to window, the Mouse move event does not work anymore!
How can I change the cursor to hand, if the mouse is over a DataPoint?

        /// <summary>
        /// Change Cursor if over a DataPoint!
        /// </summary>
        private void chartControl_MouseMove(object sender, MouseEventArgs e)
        {
            NHitTestResult htr = chartControl.HitTest(e.Location);

            if (htr.ChartElement == ChartElement.DataPoint)
            {
                NDataPoint dp = (NDataPoint)htr.Object;
                var series = (NSeriesBase)dp.ParentNode;
                if (series is NPointSeries)
                {
                    chartControl.Cursor = Cursors.Hand;
                    //Debug.WriteLine("Cursor should be changed to Hand!");
                }
            }
            else
            {
                chartControl.Cursor = Cursors.Default;
                //Debug.WriteLine("Cursor should be changed to Default!");
            }
        }







Similar Topics


Reading This Topic