I am using a windows 开发者_开发百科form in which i have a build a usercontrol with one textbox and one CheckedList control. What i wanted to do is i want to capture the ListIndexChanged event of CheckListbox control in my form where i use this usercontrol.
Please help me how to do this
You can add this
public event EventHandler SelectedIndexChanged
{
add { checkListBox.SelectedIndexChanged += value; }
remove { checkListBox.SelectedIndexChanged -= value; }
}
to your control and subscribe to this event from the form
take a look here
精彩评论