Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Aktuelle Momoposition herausfinden (https://www.delphipraxis.net/33218-aktuelle-momoposition-herausfinden.html)

OnFire 3. Nov 2004 14:25


Aktuelle Momoposition herausfinden
 
Hey Leute,

habe mal wieder ein Problem... :oops:

Ich möchte mir gerne in einer Showmessage anzeigen lassen, in welcher Zeile ich
mich in einem Memofeld befinde, habe jedoch keine Ahnung wie das geht.

Hoffe jemand kann mir helfen :thumb: :thumb:

Thanks OnFire :twisted:

Nicodius 3. Nov 2004 14:28

Re: Aktuelle Momoposition herausfinden
 
Delphi-Quellcode:
CaretPos
oder mit [memo1.capicity+1(weils bei 0 beginnt)]

Dax 3. Nov 2004 14:35

Re: Aktuelle Momoposition herausfinden
 
Mit Delphi-Referenz durchsuchenCaretPos geht das ganz einfach:
Delphi-Quellcode:
var
  Pos: TPoint;
begin
  Pos := Memo1.CaretPos;
end;
Dann enthält Pos die Koordinaten des Schreibcursors, startet oben links mit 1, 1.

Harry M. 3. Nov 2004 14:39

Re: Aktuelle Momoposition herausfinden
 
Code:
 showmessage('position in Memo1 ist zeile: '+IntToStr(Memo1.CaretPos.Y)+' Spalte: '+IntToStr(Memo1.CaretPos.X));
oder so.. :cyclops:

Harry M. 3. Nov 2004 15:03

Re: Aktuelle Momoposition herausfinden
 
hat sich aus versehen 2mal gesendet.. sorry :wall:


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz