I want to know how to move the cursor to the end of a line in a TextArea.
TextArea1.SelectionStart = TextArea1.Text.Length
EDIT: I see now that you said end of a line, the above just moves it to the end of the text.
Not a great solution but the below is quick (messy) test that works for me but needs work (error checking, handling end of lines better, etc):
TextArea1.SelectionStart = TextArea1.CharacterPosition(line #) - 2
Let’s check the results.
Thank you.
This might be a bit better:
// line # starts at zero, so use line #-1
TextArea1.SelectionStart = TextArea1.Text.IndexOf(TextArea1.CharacterPosition(line#-1), EndOfLine.CR)
What I want is to do AppendText(str) and then as the text continues to be written, the lines will continue to be added and I want to move them to the line I want.
Do you know there is documentation ?
And it can be Local or Internet (Preferences).
This is for DesktopTextArea (recent Xojo):
https://documentation.xojo.com/api/user_interface/desktop/desktoptextarea.html#desktoptextarea-addtext