Panning Cursor style
Posted: Mon Jul 10, 2006 5:10 am
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,
thanks,
Steema Software - Customer Support Forums
http://216.92.243.79/support/
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;
}
}