I have a usercontrol (container type) that needs to respond to events raised
by controls placed on it. Unfortunately, I cannot use WithEvents because the
controls are being added dynamically. I think AddHandler will work, but I
cannot find the documentation. Any help would be appreciated.
Protected Overrides Sub OnControlAdded(ByVal e As
System.WinForms.ControlEventArgs)
Dim NewRadioButton As RadioButton
If TypeOf (e.Control) Is Radiobutton Then
NewRadioButton = CType(e.Control, RadioButton)
AddHandler ???, ???
End If
End Sub
Private Sub SmartGroupBox_RadioClicked(ByVal sender As Object, ByVal e As
System.EventArgs)
'Code to respond to a Radio Button's Click Event
End Sub
--
Jonathan Allen