CheckBox control exposes both boolean
CheckState properties, which allow you to set the control to either checked, unchecked, or mixed state (
Indeterminate enum value).
I want to set a
ListView item's state to
Indeterminate, but only the
Checked property seems to be available. So, is there a way to set it to mixed, possibly by window messaging or similar tricks?
Well, you can use the following workaround:
Of course you also need to write several helper methods to get checked state, etc. But in general this solution is relatively easy to implement.
Actually internal ListView implementation do the same, but this logic is hidden inside comctl32.dll.