In the symhighlight code I've posted here I here a treeview with multiple check boxes per line.
Getting this to actually work took a bit of experimentation.
At first I thought it wouldn't work -- I could get multiple check boxes to appear on a line, but they wouldn't work correctly. This is why there are 3 implementations: Check boxes, Faking it with "[ ]/[X]" text, and Switches.
Eventually I found the trick. In setItemState() I set the state of each check box in right to left order. Setting them in left to right order doesn't work reliably.
Now I noticed though that symtag_clear_all_sym_highlights() doesn't update the dialog correctly ... only one of the "Enabled" check boxes gets cleared.
This function loops thru each highlight and calls _TreeSetCheckState() to uncheck the first checkbox on each line.
So far, I've not been able to make this work -- only one of them visually changes state.
I've verified that the code does actually call _TreeSetCheckState() to change the state of each of the check boxes. When I switch to my fake "CHECK_TEXTONLY" implementation, it works correctly.
I've tried a number of things, including splitting up that loop with _post_call(), and still no luck.
Whats going on?
Why are list boxes with checkboxes so unreliable?