Is it possible to change the mouse cursro to 'Hand' while panning with the rmouse key? I tired with mouseup/mousedown etc. but it gets overriden.
thanks,
Panning Cursor style
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi matthbri,
Yes, you can use something like this:
Yes, you can use something like this:
Code: Select all
private Boolean IsScrolling = false;
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand;
IsScrolling = true;
}
else
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
IsScrolling = false;
}
}
private void tChart1_MouseUp(object sender, MouseEventArgs e)
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
IsScrolling = false;
}
private void tChart1_MouseMove(object sender, MouseEventArgs e)
{
if (IsScrolling)
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand;
}
else
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}
}
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 |