Panel Touch solution needed

enonod

Well-Known Member
Licensed User
Longtime User
SOLVED: Panel Touch solution needed

Now solved,but I cannot delete this
B4X:
Sub pnl_Touch(Action As Int, X As Float, Y As Float)
   If Action=0 Then 'solved by adding a further condition
      col=X/(kCellwh+1) : row=Y/(kCellwh+1)
      If ((col>5 AND col<15) AND (row=7 OR row=10)) OR ((row>5 AND row<18) AND (col=2 OR col=13)) Then
         lPos.C=col : lPos.R=row
         findBx(col,row)
      End If
   End If
End Sub
Most of the above is irrelevant. I am using Touch and not Click because I need the return of coords.
Unfortunately, unlike using Click effectively turning off Touch the same does not happen with the three actions of touch when only one is used.
Everything works fine with a straight touch, but if my finger or stylus slightly slides, things go wrong even though I reject all but action 0.
It is as if the sub is unexpectedly re-called.
Is there a way to detect the first touch and eliminate any slide or other action?
 
Last edited:
Top