To accomplish this task, you need to implement the boolean property (allowChangeCheck) in the CheckedListBoxControl descendant, which defines whether changing the check state is allowed. You need to create your own ListBoxControlState descendant for the appropriate state based on the SelectionMode that you want to assign for the CheckedListBoxControl, and override its MouseUp method to change the value of the allowChangeCheck property.
SelectionMode.One - SingleSelectState,
SelectionMode.MultiSimple - MultiSimpleSelectState,
SelectionMode.MultiExtended - ExtendedMultiSelectState,
SelectionMode.None - UnselectableState
Then, override the OnchangeCheck method of the Checked ListBoxControl class and suppress further processing, if the allowCHangeCheck property is false.
Question Comments
Added By: Scott Wylie at: 7/16/2015 11:44:52 AM
This code prevents the user from using the spacebar to toggle the checkbox. How should this be changed to include this functionality and ONLY click the glyph to check using the mouse?