Hi,
I draw some rectangles directly on the chart canvas in the afterdraw event of my chart (using Graphics3D class).
I would need to change the cursor shape to cursors.hand when the mouse is over one of the rectangles.
Is it possible to do that, and how ?
Thanks by advance,
Verane.
Changing cursor shape in some teechart parts
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Verane,
Yes, it is possbile. You should do something like this:
Yes, it is possbile. You should do something like this:
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.Rectangle(Brushes.Purple, rect);
}
private void tChart1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(rect.Contains(e.X, e.Y))
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand;
else
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}
private Rectangle rect;
private void Form1_Load(object sender, System.EventArgs e)
{
line1.FillSampleValues();
rect = new Rectangle(100,100,100,100);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |