Sub AddReviewPnl_Touch (Action As Int, X As Float, Y As Float) As Boolean 'Return True to consume the event
Log("Touch")
Select Action
Case AddReviewPnl.ACTION_DOWN
Log("Down")
XStart = X
Case AddReviewPnl.ACTION_MOVE
Log("Move")
XMove = X-XStart
If Idisplay.Text.Length>14 Then
If Abs(XMove) > Idisplay.Width/15 Then
XMove = Round2((XMove/15),0) 'Changes XMove from pixels to Chars
Log("XMove = "&XMove)
CurrentStart = Idisplay.SelectionStart
If XMove < 0 Then
Idisplay.SelectionStart = Max(CurrentStart+XMove, Idisplay.Text.Length - 10)
Else
Idisplay.SelectionStart = Min(CurrentStart+XMove, Idisplay.Text.Length)
End If
End If
End If
Case AddReviewPnl.ACTION_UP
Log("up")
End Select
Return True
End Sub