D Deleted member 103 Guest Mar 12, 2016 #1 Hi, this feature is available for Android, there is something for iOS? B4X: Public Sub SimulateClick(b As View) Dim r As Reflector r.Target = b r.RunMethod("performClick") End Sub
Hi, this feature is available for Android, there is something for iOS? B4X: Public Sub SimulateClick(b As View) Dim r As Reflector r.Target = b r.RunMethod("performClick") End Sub
JanPRO Well-Known Member Licensed User Longtime User Mar 12, 2016 #2 Hi, why not call the click event directly? Or do you need it e.g. for a textview ....? Jan Last edited: Mar 12, 2016 Upvote 0
D Deleted member 103 Guest Mar 12, 2016 #3 JanPRO said: Hi, why not call the click event directly? Or do you need it e.g. for a textview ....? Jan Click to expand... Thanks Jan! Unfortunately, you can not because the event is used by several labels. Upvote 0
JanPRO said: Hi, why not call the click event directly? Or do you need it e.g. for a textview ....? Jan Click to expand... Thanks Jan! Unfortunately, you can not because the event is used by several labels.
JanPRO Well-Known Member Licensed User Longtime User Mar 12, 2016 #4 Filippo said: you can not because the event is used by several labels. Click to expand... Can you explain that? Upvote 0
Filippo said: you can not because the event is used by several labels. Click to expand... Can you explain that?
D Deleted member 103 Guest Mar 12, 2016 #5 JanPRO said: Can you explain that? Click to expand... For example, 4 Label with a click-event. Label = label1, label2, label3, label4 Event = lbl_Click How can I simulate the Click-event of label1? B4X: Sub lbl_Click Dim lbl As Label = Sender ... End Sub But now is anyway no longer necessary, I have another solution found. Upvote 0
JanPRO said: Can you explain that? Click to expand... For example, 4 Label with a click-event. Label = label1, label2, label3, label4 Event = lbl_Click How can I simulate the Click-event of label1? B4X: Sub lbl_Click Dim lbl As Label = Sender ... End Sub But now is anyway no longer necessary, I have another solution found.
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2016 #6 A possible solution is: B4X: Sub lblHandler(lbl As label) 'all the event code is here End Sub Sub lbl_Click lblHandler(Sender) End Sub Now you can call lblHandler with any label. Upvote 0
A possible solution is: B4X: Sub lblHandler(lbl As label) 'all the event code is here End Sub Sub lbl_Click lblHandler(Sender) End Sub Now you can call lblHandler with any label.