at the moment I try to create an extented version of ListView in a class SortExpandListView. Therefore I defined a CustomListView in Main as a class internal:
At the moment I handle the Events in the MAIN module and forward them to the class:
Now my question is: can I modify the class, so that mCLV directly receives the events?
B4X:
'in main:'
Private clv1 As CustomListView, Listview As SortExpandListView
...
Sub AppStart ()
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
Listview.Initialize(clv1)
'and in class:'
Private mCLV As CustomListView
...
Public Sub Initialize (CLV As CustomListView)
mCLV=CLV
End Sub
At the moment I handle the Events in the MAIN module and forward them to the class:
B4X:
'in main:'
Listview.Initialize(clv1)
...
Private Sub lblTitle_MouseClicked (EventData As MouseEvent) ' a view in the clv1
Listview.OpenItem(Sender)
End Sub
'and in class:'
Public Sub OpenItem(lbl As B4XView)
Dim index As Int=mCLV.GetItemFromView(lbl)
...
Now my question is: can I modify the class, so that mCLV directly receives the events?