Event bubbling in WinForms???

  • Thread starter Thread starter Sreekanth
  • Start date Start date
S

Sreekanth

Hello,
I want to bubble an event to the parent control. i.e if there is no event
handler in my control then that event has to be passed to the parent
control. If the parent has the event handler it should handle otherwise it
should bubble to its parent. How can I do this? My requirement is to have a
common event handler for all my child controls.

Please suggest.
Thanks,
Sreekanth.
 
Sreekanth,

If that is the case, then you have to implement this yourself. Windows
forms does not support event bubbling. Basically, you will have to have
each control link to all the event handlers of the controls it contains, and
then propogate that event when the event is fired.

Hope this helps.
 
Back
Top