I have a TreeView populated using TreeNodes that has icons and checkboxes.
I am trying to disable check / BerforeCheck some of them by throwing an event in the BerforeCheck method. This works fine until I double-click on the flag: the image of the flag is opposite to its actual state (it shows a check mark if the status is Checked=false ). I tried to fix this manually by changing StateImageIndex in the NodeDoubleClick and BeforeClick without success.
Even worse: I added a third image to StateImageList (yes, I want the checkboxes to be three-states too), but I still don't use it (it is never set in my code), and the third image is set as the current state of the window after some double-click (at this moment I canβt define a clear behavior).
How can I at best make it work as exepected, in the worst case, disable double-clicking on the checkbox? Thanks.
PS: the question already was, but there was no answer ...
source share