Android Question Call click event in a new module from another module

Enthousiastic

Member
Licensed User
Longtime User

LucaMs

Expert
Licensed User
Longtime User
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

[Note: not tested]
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
How can I call the click event from this new module with a command ?
You can´t as you can not set the SENDER by code.

You can however create a method that can be called.But remember that that you can´t use the SENDER here.
 
Upvote 0

Enthousiastic

Member
Licensed User
Longtime User
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. :):)
 
Upvote 0
Top