AddHandler

NathanSav

Member
Joined
Feb 7, 2011
Messages
7
Programming Experience
10+
HI

I have created a control, similar to an image combo, but a bit different. Any how, each of the labels that contians text to be clicked has an ID in their tag, that i wish to read. I have a sub routine called CBO_Click() which has the same arguments as a normal label click. How can i add the argument for the ID in the labels tag to be passed to this sub.

Thanks.
 
You don't. The only thing that gets passed to an event handler is the 'sender' parameter, which is a reference to the instance that raised the event, and 'e', which may contain additional event information. All you need from that button you can reach from the sender reference. CType(sender, Button).Tag fx.
 
Back
Top