views:

15

answers:

0

I am working on extending a TreeView in C#, and I have a couple of things I want to do when the checkbox changes state. I handle things in the OnAfterCheck and for the most part it works fine as long as I click once, or there is a reasonable amount of time between clicks. The problem comes if I click just slower than a double click. The first click automatically changes the icon, the checked state and triggers the OnAfterCheck. The second click changes the icon, but doesn't seem to change the actual "Checked" state. The second click also doesn't trigger the OnAfterCheck. Incidentally, it also doesn't trigger the OnBeforeCheck.

Does anyone have any idea what is going on? Is this a bug in the TreeView control? Is there a way to either handle the second click or prevent it?