event handling dynamically created control

Ashwin

New member
Joined
Apr 2, 2015
Messages
1
Programming Experience
Beginner
Hello everyone,
I created controls (a groupbox)dynamically during runtime and using addhandler for that dynamically created control to go to an event.The problem is when the 2 nd groupbox is creatd dynamically it goes to the event of previous handler and the changes are reflected for every dynamic control.How can I avoid it?
 
How can I avoid it?
Avoid what? You can use RemoveHandler if you want to remove event handler. 'sender' event handler parameter can be used to identify which control raised the event.
 
Back
Top