Hello ,
I want to create my own custom view that contains the TableView Class ( https://www.b4x.com/android/forum/threads/class-tableview-supports-tables-of-any-size.19254/#content ). For example its name is "MyCustomView".
How can I call the click event from this new module with a command ?
I need to re-declare the events in the new module at the beginning as " #Event: CellClick(col As Int, row As Int) " ?
Many thanks Enthousiastic
In your MyCustomView class you have a TableView, for example:
B4X:
Private MyTableView As Table
MyTableView.Initialize(Me, "MyTable", 5)
Create the TableView events in your class, for example:
B4X:
Private Sub MyTable_CellClick(RowIndex As Int, ColIndex As Int)
If xui.SubExists(mCallBack, mEventName & "_CellClick", 0) Then
CallSubDelayed3(mCallBack, mEventName & "CellClick", RowIndex, ColIndex)
End If
End Sub
Thank you for your direct response. I suppose the rest events is probably done the same way.
( CellLongClick , HeaderClick , HeaderLongClick , ScrollChanged , ShowRow ).
You really are an incredible forum.