Run plugin when field changed
Posted: Fri Feb 13, 2015 5:06 pm
Hi,
I have the following plugin code which I want to fire when a field has been changed but only when it has lost focus. Currently this fires on every character entered into a field.
I think the line which needs changing is
but I don't know the appropriate event.
I basically need it to behave the same as the old breakout Inventory Changed.
Can you assist?
Thanks
Danny
I have the following plugin code which I want to fire when a field has been changed but only when it has lost focus. Currently this fires on every character entered into a field.
- Code: Select all
Public Class FormPlugin
Inherits System.MarshalByRefObject
Implements JiwaApplication.IJiwaFormPlugin
Public Overrides Function InitializeLifetimeService() As Object
' returning null here will prevent the lease manager
' from deleting the Object.
Return Nothing
End Function
Public Sub SetupBeforeHandlers(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.SetupBeforeHandlers
End Sub
Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
Dim InventoryForm As JiwaInventoryUI.InventoryMaintenanceForm = DirectCast(JiwaForm, JiwaApplication.IJiwaForm)
AddHandler InventoryForm.Inventory.PropertyChanged, AddressOf Changed
End Sub
Sub Changed(item As JiwaInventory.Inventory, e As System.ComponentModel.PropertyChangedEventArgs)
messagebox.show(e.PropertyName)
End Sub
End Class
I think the line which needs changing is
- Code: Select all
AddHandler InventoryForm.Inventory.PropertyChanged, AddressOf Changed
but I don't know the appropriate event.
I basically need it to behave the same as the old breakout Inventory Changed.
Can you assist?
Thanks
Danny