G
Guest
I have a base winform Base and a form that inherits from it Child
in the base form there is an event handler for a combo box click
Protected Overrideable Sub cboPickList_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles cboPickList.SelectedIndexChanged
DoStuff
End Sub
and in Child Form
Protected Overrides Sub cboPickList_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles cboPickList.SelectedIndexChanged
DoOtherStuff
End Sub
I would have expected that on a cboPickList SelectedIndexChanged event the
Child form event handler would be called and that the Base form one would not
however the Child Form handler is called TWICE. It looks like it is catching
an event from both the Child and Base forms
Removing the Handles clause from the base form seems to stop this however
sometimes i want the base form handler to be called (when a different child
does not override it)
any ideas how to stop this?
guy
in the base form there is an event handler for a combo box click
Protected Overrideable Sub cboPickList_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles cboPickList.SelectedIndexChanged
DoStuff
End Sub
and in Child Form
Protected Overrides Sub cboPickList_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles cboPickList.SelectedIndexChanged
DoOtherStuff
End Sub
I would have expected that on a cboPickList SelectedIndexChanged event the
Child form event handler would be called and that the Base form one would not
however the Child Form handler is called TWICE. It looks like it is catching
an event from both the Child and Base forms
Removing the Handles clause from the base form seems to stop this however
sometimes i want the base form handler to be called (when a different child
does not override it)
any ideas how to stop this?
guy