I am trying to pass the mouse up events of controls onto its parent control. I have my control, a panel in it, then 3 controls on the panel. This is a custom control added to a flow layout panel at runtime.
I am able to access the panel through the main code by using add handler, but everytime I click one of the controls on that panel I would like to pass the mouse up event through so that the panels events will fire.
Public Class Repeater
Public Event RepeaterMouseUp As MouseEventHandler
Private Sub on_Mouse_Up(ByVal sender As Object, ByVal e As MouseEventArgs) 'Handles TextBox1.onclick
RaiseEvent RepeaterMouseUp(sender, e)
End Sub
Private Sub Repeater_Load(sender As Object, e As EventArgs) Handles Me.Load
AddHandler lblRecName.MouseUp, AddressOf on_Mouse_Up
AddHandler lblNote.MouseUp, AddressOf on_Mouse_Up
AddHandler strRating.MouseUp, AddressOf on_Mouse_Up
End Sub
Private Sub lblNote_MouseUp(sender As Object, e As MouseEventArgs) Handles lblNote.MouseUp
RaiseEvent RepeaterMouseUp(sender, e)
End Sub
Private Sub Panel1_MouseUp(sender As Object, e As MouseEventArgs) Handles Panel1.MouseUp
RaiseEvent RepeaterMouseUp(sender, e)
End Sub
End Class
I cannot seem to find any usable examples of passing mouse events through to the parent control. I appreciate any help.