Hi to all,
I'm writing a class where I initialize some panels (private).
How I can handle the panels events (like _Click) within the Activity where I initialize the class?
Sub Class_Globals
'Class Variables
Private mModule As Object
Private mEventName As String
....
Public Sub Initialize(pModule As Object, pEventName As String)
mModule = pModule
mEventName = pEventName
End Sub
Private Sub RaiseEventValueChanged(UserChanged As Boolean)
If SubExists(mModule, mEventName & "_ValueChanged") Then
CallSubDelayed3(mModule, mEventName & "_ValueChanged",seekValue, UserChanged)
End If
End Sub
and in Main:
...somewhere...
B4X:
....
Dim s As SuperSeekbar
s.Initialize(Me, "s")
....
Sub s_ValueChanged(Value As Double, UserChanged As Boolean)
lbl.Text = NumberFormat(Value, 1,2)
End Sub