Event bubbling in windows forms?

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

If an event (such as a click on a button) is not handled
by that button class, is it not passed to the containing
window, (say the form) so it can be handled there?

I basically have a form with 30 small buttons on and wish
to have one generic handler for the button clicks.

Thanks

John.
 
* "John said:
If an event (such as a click on a button) is not handled
by that button class, is it not passed to the containing
window, (say the form) so it can be handled there?
No.

I basically have a form with 30 small buttons on and wish
to have one generic handler for the button clicks.

Have a look at the 'AddHandler' keyword in VB.NET and the 'Handles'
keyword.
 
Back
Top