this is on a class
hi i add a Event Handlers so how i made changes to the Event Handlers
You want to make changes to an event handler? Well, remove the event handler and then make your changes and add in the event handler again.
yes i try that but no works
So what doesn’t work? Are things just not executing? Are you raising exceptions? What is not working?
If you have a WebTextArea and want to add a handler for TextChanged, you would do something like:
AddHandler WebText1.TextChanged, AddressOf NewTextChangedEvent1
Then when you want to change it you do:
RemoveHandler WebText1.TextChanged, AddressOf NewTextChangedEvent1
AddHandler WebText1.TextChanged, AddressOf NewTextChangedEvent2
Just be sure you don’t implement the TextChanged event in the IDE.
i am lost with Just be sure you don’t implement the TextChanged event in the IDE.
so where i add the AddHandler or type in the IDE.
i use the IDE to AddHandler
[quote=136670:@Alexis Colon Lugo]i am lost with Just be sure you don’t implement the TextChanged event in the IDE.
so where i add the AddHandler or type in the IDE.
i use the IDE to AddHandler[/quote]
So in my example, I am using a WebTextArea. I do not go into the IDE and add the TextChanged event for that control. I do not believe that you can use the RemoveHandler directive on the built event handlers once they are implemented. So you just don’t use it to start with.