Reputation: 137
I have CheckedBoxList and when I click on one element, I don't want it to be checked (CheckedOnClick = false) but I would like to do an action (Show information about this SelectedItem on an other element of my Form)
I didn't find anything on a similar thing of ListBox.SelectedIndexChanged for CheckedListBox.
Any idea ?
Upvotes: 2
Views: 129
Reputation: 18744
You need to handle the CheckedListBox.ItemCheck Event which
Occurs when the checked state of an item changes.
or the ListBox.SelectedIndexChanged Event which the CheckedListBox
inherits from the ListBox
.
Inheritance Hierarchy
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ListControl
System.Windows.Forms.ListBox
System.Windows.Forms.CheckedListBox
You can check the CheckedListBox Events list, it's there. So unless you are using some kind of 3rd party control it should be available.
Upvotes: 1