Place cursor after last character in a memo control
The following code will display a DialogPage with Memo73 on the OnPreviewClick event for Memo2. After exiting, the user can click on Memo2 again and edit the text. The line Memo73.Lines.Text := TfrxMemoView(Sender).Text; places the previously entered text back in Memo73.
The following event occurs at the same time as the above event, and will place the cursor at the beginning of Memo73. If text has already been entered, the cursor will be on the first character.
How would I place the cursor after the last character if text has already been entered? I would think there is some pascal code to run on the OnShow event to accomplish that. Thanks
procedure Memo2OnPreviewClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
var
  s1 : string;                                             Â
begin
  Label2.caption:='Type information';  //Label ID on Dialog   Â
  Memo73.Lines.Text := TfrxMemoView(Sender).Text;     Â
  Memo73.visible:=True; //MemoID on dialog                                 Â
  DialogPage1.ShowModal;
  TfrxMemoView(Sender).Text := Memo73.Lines.Text;  //MemoID on Dialog     Â
  Modified := True;
end;
The following event occurs at the same time as the above event, and will place the cursor at the beginning of Memo73. If text has already been entered, the cursor will be on the first character.
procedure DialogPage1OnShow(Sender: TfrxComponent);
begin
  Memo73.SetFocus; Â
end;
How would I place the cursor after the last character if text has already been entered? I would think there is some pascal code to run on the OnShow event to accomplish that. Thanks