iOS Question B4XFloatTextField place cursor at end

tsteward

Well-Known Member
Licensed User
Longtime User
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
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
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…