Skip to content

Instantly share code, notes, and snippets.

@chilversc
Created December 16, 2010 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chilversc/743723 to your computer and use it in GitHub Desktop.
Save chilversc/743723 to your computer and use it in GitHub Desktop.
DataGridView pointer bug
/*
* Steps to reproduce:
*
* 1) click the button.
* 2) observe wait cursor displays for whole form.
* 3) hover mouse over data grid view (wait cursor shows).
* 4) click the button.
* 5) observe normal cursor displayed over form.
* 6) hove mouse over data grid view (wait cursor still shows).
*
* Actual Behaviour:
* Wait cursor displays for data grid view after setting UseWaitCursor = false.
*
* Expected Behaivour:
* Wait cursor should not show.
* */
using System.Windows.Forms;
class Program {
public static void Main (string[] args) {
var f = new Form ();
var b = new Button ();
var d = new DataGridView ();
b.SetBounds (0, 0, 20, 20);
d.SetBounds (0, 20, 100, 100);
f.Controls.Add (b);
f.Controls.Add (d);
b.Click += delegate {
f.UseWaitCursor = !f.UseWaitCursor;
};
Application.Run (f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment