I have to know by an event that is raised automatically if a view state changes from enabled to disabled and vice versa.
Do'nt know if to it is possible with an event or listener or else.
Can anyone please help me with a b4a code snipped to solve this? Thank you in advance.
Which view(s) are you wanting to use this with? If it's XUI views you can modify the source code to create a new version. Add a DesignerProperty (myEnabled as boolean) and when that is changed have it execute a callsubdelayed event that you can deal with in your main code and an 'mbase.enabled =' to actually change the enabled state.
[Edit] actually no need for a new designer property you could simply add / modify
B4X:
Public Sub setEnabled (b As Boolean)
mBase.enabled = b 'Deal with enabling / disabling the control
If xui.SubExists(mCallBack, mEventName & "_EnabledStateChanged", 1) Then
CallSubDelayed2(mCallBack, mEventName & "_EnableStateChanged", b)
End If
End Sub