Topic: Insertion Point in Memo Fields

I am doing a "Lines.Add" in a script to add text to the end of a memo (multiline) field. And then I set the focus to the memo field. However, the cursor(Insertion point) is sitting on the next line after what I just inserted in the memo field. Is there a way to set the cursor next to the text I just inserted rather than on the next line? Or can a keystroke be sent to the memo field to backup one space? Thank you.

Re: Insertion Point in Memo Fields

Example:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    Form1.Memo1.Lines.Add('some text');
    Form1.Memo1.SetFocus;
    Form1.Memo1.SelStart := Length(Form1.Memo1.Text)-1;
end;
Dmitry.

Re: Insertion Point in Memo Fields

Thank you Dimitry. That worked. Wasn't aware of "SelStart". Didn't see it in Delphi Basics. Thanks again.