ControlEventHandler

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Well, I want to show a Message when I insert a checkBox in
a Panel control.
 
Ok, then.
1. In your form declare a methods with the following prototype

private void panel_ControlAdded(object sender, ControlEventArgs e)
{
if(e.Control is CheckBox)
{
//show the message
}
}

2. In the form constructor hook the panel's ControlAdded event

panel.ControlAdded += new ControlEventHandler(panel_ControlAdded);

where *panel* is a reference to the panel, which you want to monitor.

HTH
B\rgds
100
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top