Get cursor position in textbox?

tsteward

Well-Known Member
Licensed User
Longtime User
How can I get the cursor position in a multiline textbox.
I want to programatically enter text at the cursor position

Thanks
Tony
 

tsteward

Well-Known Member
Licensed User
Longtime User
Turns out its quit easy
B4X:
  i = TextEdit.SelectionStart
 TextEdit.Text  = StrInsert(TextEdit.Text,i,"[]")
 TextEdit.SelectionStart = i + 1
 TextEdit.ScrollToCaret
 
Top