P paul j Member Licensed User Dec 15, 2007 #1 On runtime I add events to an object (e.g. onFocus to a textbox), but on closing the form the event stays active so I get errors when swithing to an other form. I cant find a way to remove te event from the object. Is it possible any way?
On runtime I add events to an object (e.g. onFocus to a textbox), but on closing the form the event stays active so I get errors when swithing to an other form. I cant find a way to remove te event from the object. Is it possible any way?
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2007 #2 You can't remove the event. You can do something like: B4X: Sub Globals handleFocus = true 'you can use an array or an arraylist instead. End Sub Sub TextBox_GotFocus If Not(handleFocus) then return ... End Sub
You can't remove the event. You can do something like: B4X: Sub Globals handleFocus = true 'you can use an array or an arraylist instead. End Sub Sub TextBox_GotFocus If Not(handleFocus) then return ... End Sub