[Lazarus] Memo for touchscreen
Koenraad Lelong
lazarus2 at de-brouwerij.be
Sun Jul 21 08:02:13 CEST 2013
Op 19-07-13 16:21, Malcolm Poole schreef:
...
>
> ==================================
>
> procedure TForm1.UpButtonClick ( Sender: TObject ) ;
> var
> newcaretPos: Integer;
> x: Integer;
> begin
> newcaretPos := 0;
> writeln(Memo1.CaretPos.Y, #32, Memo1.CaretPos.X);
> for x := 0 to Memo1.CaretPos.Y-2 do
> newcaretPos := newcaretPos + Length(Memo1.Lines[x]) +
> Length(LineEnding);
> if Length(Memo1.Lines[Memo1.CaretPos.Y-1]) < Memo1.CaretPos.X
> then newcaretPos := newcaretPos +
> Length(Memo1.Lines[Memo1.CaretPos.Y-1]) + 1
> else newcaretPos := newcaretpos + Memo1.CaretPos.X;
> Memo1.SelStart := newcaretPos;
> Memo1.SetFocus;
> end;
>
Hi,
Thanks,
but you're too nice, leave me some homework ! ;-)
Koenraad Lelong
More information about the Lazarus
mailing list