You must respond to the focus ABMInput.
Use this code, then no matter where you click in the text, the cursor will be positioned at the end.
Example code set cursor to end text where focus:
Sub inp_GotFocus()
Dim inp As ABMInput = page.Component("inp")
Dim t As String = inp.Text
t=t&" "
inp.Text = t
inp.Refresh
inp.Text = t.SubString2(0,t.Length-1)
inp.Refresh
End Sub
This seems indeed the way to do it cross browser. It surprises me that there isn't an easier way to do it. Even in JavaScript, people have to do weird stuff like:
B4X:
$('#el').focus(function(){
var that = this;
setTimeout(function(){ that.selectionStart = that.selectionEnd = 10000; }, 0);
});
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.