Op 18-07-13 21:24, Malcolm Poole schreef:
>
> procedure TForm1.LetterAButtonClick ( Sender: TObject ) ;
> var
> testcaretpos: Integer;
> begin
> testcaretpos := Memo1.SelStart;
> Memo1.Text := Copy(Memo1.Text, 1, testcaretpos) + 'A'
> + Copy(Memo1.Text, testcaretpos+1, MaxInt);
> Inc(testcaretpos);
> Memo1.SelStart := testcaretpos;
> Memo1.SetFocus;
> end;
>
> procedure TForm1.DeleteButtonClick ( Sender: TObject ) ;
> var
> testcaretpos: Integer;
> begin
> testcaretpos := Memo1.SelStart;
> Memo1.Text := Copy(Memo1.Text, 1, testcaretpos)
> + Copy(Memo1.Text, testcaretpos+2, MaxInt);
> Memo1.SelStart := testcaretpos;
> Memo1.SetFocus;
> end;
Thanks,
Works fine, except for navigating up and down. Left and right is OK, I
have to find out how to know on what line the cursor is, and then going
to the next/previous line, if possible.
regards,
Koenraad Lelong.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus