Make CheckedListBox Item selectable only over check
Hi there,
I have a CheckedListBox with some items. Currently, no matter where I click on an item, it gets selected. What I want to do is make the item selected only when I click on its check.
Thank you for your comment! I'll try it later today or tomorrow and let you know how it worked out.
Thanks!
acicovic
ASKER
Hi there,
Works as advertised :)
There is only one thing that's not working as I expected, and this is probably due to the way I posed the question. The code that you provided deselects all items when we click on an item outside the checkbox area. In that case however, I wanted the item to get selected, but not checked.
In other words, I want the functionality of a CheckedListBox with item selection on double click. However, when we click directly on the checkbox it should be selected/deselected using only one click.
Given the code above though, I see how I would go about doing that provided I can cancel the MouseUp event. Is there a way? I've seen an e.Cancel property but it doesn't appear in this case.
Mike Tomlinson
Lol...ok. Let's start over as I'm confused as to what it should do now...trying to make sense of the first set of requirements with the second set. =\
Given a non-modified CheckedListBox, what different functionality do you want? What needs to be removed/added?
It should behave exactly as the default CheckedListBox (CheckOnClick property set to False). However, when we click directly on the CheckBox it should behave as if the CheckOnClick property was set to True.
Is this clearer?
acicovic
ASKER
Hi Idle_Mind,
Let me know if you plan on answering the "changed" question. If not, I think I should still accept your first comment since it answered my question as I originally posed it.
Thanks...
Mike Tomlinson
Hi acicovic,
Sorry for the delay. I just haven't gotten back to this question yet. I'll play with it today...
Thank you for your comment! I'll try it later today or tomorrow and let you know how it worked out.
Thanks!