I am trying to find out how to generically cancel and re-enable an event on a CheckListBox.
I could do it this way, if I know the event:
public void cancelevent()
{
checkedListBox1.ItemCheck -= new ItemCheckEventHandler(this.checkedListBox1_ItemCheck);
}
but I have 5 CheckListBoxes that I want to do this for and want to pass the CheckListBox in an disable the ItemCheck event (whatever it is), do something and then re-enable it. In this case, to programmatically check or uncheck a checkbox without the event firing.
Is there something like:
checkListBox1.ItemEvent.<on or off>,
or someway I can get the event name and use that with the above method?
Thanks,
Tom
I could do it this way, if I know the event:
public void cancelevent()
{
checkedListBox1.ItemCheck -= new ItemCheckEventHandler(this.checkedListBox1_ItemCheck);
}
but I have 5 CheckListBoxes that I want to do this for and want to pass the CheckListBox in an disable the ItemCheck event (whatever it is), do something and then re-enable it. In this case, to programmatically check or uncheck a checkbox without the event firing.
Is there something like:
checkListBox1.ItemEvent.<on or off>,
or someway I can get the event name and use that with the above method?
Thanks,
Tom