Add handler to Arraylist object [RESOLVED]
I need to add an handler to my object...!!!
here, can't get the .Click to work... without or with the option strict off/on... :(
VB Code:
Private o As ArrayList = New ArrayList
Form_Load
o.Add(New RadioButton)
End Sub
CmdAdd_Click
AddHandler o(o.Count - 1).Click, AddressOf oClick
End Sub
oClick
Msgbox "YAY!"
End Sub
HELP!
Re: Add handler to Arraylist object
Fixed it...
VB Code:
Private o As ArrayList = New ArrayList
Form_Load
o.Add(New RadioButton)
End Sub
CmdAdd_Click
Dim b as RadioButton
b = o(o.Count-1)
AddHandler b.Click, AddressOf oClick
End Sub
oClick
Msgbox "YAY!"
End Sub
:wave: