tsteward Well-Known Member Licensed User Longtime User Aug 7, 2008 #1 How can I get the cursor position in a multiline textbox. I want to programatically enter text at the cursor position Thanks Tony
How can I get the cursor position in a multiline textbox. I want to programatically enter text at the cursor position Thanks Tony
agraham Expert Licensed User Longtime User Aug 7, 2008 #2 Textbox.SelectionStart sets and returns the cursor position in the string in the text box. Identifying the cursor as line number and position in line is not easily done.
Textbox.SelectionStart sets and returns the cursor position in the string in the text box. Identifying the cursor as line number and position in line is not easily done.
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2008 #3 Maybe this thread will help you: http://www.b4x.com/forum/open-source-projects/1223-text-editor-henshu.html
Maybe this thread will help you: http://www.b4x.com/forum/open-source-projects/1223-text-editor-henshu.html
tsteward Well-Known Member Licensed User Longtime User Aug 8, 2008 #4 Turns out its quit easy B4X: i = TextEdit.SelectionStart TextEdit.Text = StrInsert(TextEdit.Text,i,"[]") TextEdit.SelectionStart = i + 1 TextEdit.ScrollToCaret
Turns out its quit easy B4X: i = TextEdit.SelectionStart TextEdit.Text = StrInsert(TextEdit.Text,i,"[]") TextEdit.SelectionStart = i + 1 TextEdit.ScrollToCaret