How do I place the cursor at the end of the existing text.
This code works in B4A but selects the whole field in B4I
This code works in B4A but selects the whole field in B4I
B4X:
Private Sub B4XFTxtSearch_TextChanged (Old As String, New As String)
If New.Length>2 Then
Wait For (loadVehicles(clvModels,$"SELECT * FROM Vehicles WHERE Model LIKE ? order by Model"$,$"%${New}%"$)) Complete (Success As Boolean)
Wait For (loadVehicles(clvAKAModels,$"SELECT * FROM Vehicles WHERE AKA LIKE ? order by Model"$,$"%${New}%"$)) Complete (Success As Boolean)
B4XFTxtSearch.RequestFocusAndShowKeyboard
#if b4i
Dim et As TextField = B4XFTxtSearch.TextField
#else
Dim et As EditText = B4XFTxtSearch.TextField
#End If
et.SelectionStart=et.Text.Length
End If
end sub