I have TreeView control on a form for an application running on a Win 6.0 device with 2.0 SDK.
On the device (touch screen) I tap a checkbox in the treeview, it flashes the correct check state, but then reverts. I can only check or un-check if I double click it.
This problem does not occur when running in an emulator.
I'll try to explain a little more clearly with an example:
-a box is currently un-checked -user taps the checkbox (it is a touch screen device) -I see the 'X' appear briefly in that box, but then it reverts to its un-checked state -user double-taps the check box, it works.
After using the C# code in the link, I got it working. And in any place I was originally using the AfterClick event, I just changed it to a MouseDownOveride event.
Just had to make one change in the new TreeView though: MouseUp is overriden instead of MouseDown. This is because the actual "checked" value isn't sent to the MouseDownOveride handler if we override the MouseDown event. Not sure why. So when checking the the checked state in the MouseDownOveride handler, it would always be the previous value.