There is a regular CheckedListBox , it has one element - CheckBox , I need to catch an event when I click on a mouse not on CheckedListBox , but on CheckBox , which is in it, I try this:

 private: System::Void checkedListBox1_MouseEnter(System::Object^ sender, System::EventArgs^ e) { if (checkedListBox1->Items[0]->GetType()->GetEvent(L"Click")) { MessageBox::Show("Click!"); } } 
  • Use the ItemCheck event. - Alexander Petrov
  • @Alexander Petrov - and if I do not create this checkbox in advance, and it is created by pressing a button? - Duracell
  • In the ItemCheckEventArgs parameter ItemCheckEventArgs index of the item that was changed. See the sample code in C # - everything is painted there. - Alexander Petrov
  • @Alexander Petrov - can you link with an example? - Duracell
  • There is no C ++ in your code, but there is C ++ / CLI. Please stop adding the tag of the language that is not in question. - ixSci

0