Autor Beitrag
Beutel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 89

WIN XP

BeitragVerfasst: Mi 14.09.05 09:12 
also wenn ich mit dem Cursor im Memo Feld bin kann man da heraus finden auf welcher Zeile der Cursor gerade ist?
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Mi 14.09.05 09:14 
Ja, kann man! ;-)

Schau mal in die FAQ. Dort gibt einen einen Beitrag dazu.

Lg Martin
Beutel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 89

WIN XP

BeitragVerfasst: Mi 14.09.05 09:23 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure GetMemoLineCol (aMemo: TCustomMemo; var aMemoLine, aMemoCol: Integer);
begin
  with aMemo do 
    begin     
      aMemoLine := SendMessage (Handle, EM_LINEFROMCHAR, SelStart, 0);
      aMemoCol := SelStart - SendMessage (Handle, EM_LINEINDEX, aMemoLine, 0);   
    end; 
end;


okay hab ich gefunden aber was über gebe ich dem bitte für variablen bei aMemo denn Memo namen aber bei denn anderen?

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Mi 14.09.05 09:45 
Bei den beiden letzten Paramater handelt es sich um "variablen Parameter". Diese Parameter geben dir einen Wert zurück. In diesem Fall halt die Position des Cursors (Zeile und Spalte).

Lg Martin