I have a chart with two series: one Points series and one Shape series. Most of the points in the point series is located on top of the shape series. I want to be able to click the points but not the shape. When the point is located on top of the shape it is the shape that becomes clicked (the points are small). Very difficult to hit the point and not the shape...
Is it possible to set the shape to be not clickable?
I also wonder if it is possible to set the cursor to become a hand when hovering over a point.
Making a shape series not clickable
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
With a shape series under a points series you should be able to use the following code:Is it possible to set the shape to be not clickable?
I also wonder if it is possible to set the cursor to become a hand when hovering over a point.
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
tChart1[1].FillSampleValues();
}
private void points1_Click(object sender, System.Windows.Forms.MouseEventArgs e)
{
label1.Text = e.Y.ToString();
}
private void tChart1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
int click = points1.Clicked(e.X, e.Y);
if(click != -1)
this.Cursor = System.Windows.Forms.Cursors.Hand;
else
this.Cursor = System.Windows.Forms.Cursors.Default;
}
}
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/